Home  >  Article  >  Web Front-end  >  Things you need to pay attention to and some basic syntax when using JavaScript_Basic knowledge

Things you need to pay attention to and some basic syntax when using JavaScript_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 18:20:311562browse

1. Javacsript implements hyperlinks: Copy code The code is as follows:


var f1=function(i1,i2){return i1 i2};
Alert(f1(10,12));
Alert(function( i1,i2){return i1 i2}(10,12));

4. There is no concept of namespace in Javascript. Functions with the same name in two js files are quoted as last or last The declared function shall prevail.
When referencing external js files: it cannot be

5. There is no class syntax in Javascript, which is simulated with function closures.

6. Arrays in JS are not just ordinary Arrays can also be used as Dictionary and Stack. 🎜>var array=new Array();
array["人"]="ren";
array["口"]="kou";
array["hand"]="shou "
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:De facto standard The incredible fact standard in the world_Basic knowledgeNext article:De facto standard The incredible fact standard in the world_Basic knowledge

Related articles

See more