Infi-chu:
http://www.cnblogs.com/Infi-chu/
First, JavaScript introduction:
JavaScript was originally a scripting language, but as the web era evolved, he became a web-oriented programming language, now a veritable web-oriented programming language. Most Web sites are developed using JavaScript, and all browsers contain JavaScript interpreters.
Second, JavaScript features:
1. High-end
2. The dynamic
3. Weak type
4. Robustness
5. High efficiency
6. Versatility
Third, the initial JavaScript (some simple examples):
Declare the variable var x through the var keyword; Declare variable//pass = assign value to variable x=0; Multiple data types of assignment//javascript x=11; Plastic x=0.5; Floating-point x= "Nice to meet you~"; String x= ' nice to meet you~ '; Single-Quote double-quote usage is similar to pythonx=true; Boolean type x=null; Special value, NULL x=undefined //with NULL//Create object, similar to dictionary in python var test={ A: ' Hello '; B: ' Hi '};test.a; Accessing object Properties test["B"]; Access Object Properties test.c= ' OK '; Create a new attribute by assigning//create an array, equivalent to the Listvar test1=[2,5,6,9];//common operation symbol in Python//+-*/ subtraction var d=1;d++;d-;d +=1; D = d+1d *=2; D = d*2/*== equals = = Not equal to < less than > greater than <= less than or equal to >= greater than or equal to *///logical operator (q==1) && ( p==2) //&& and (q==1) | | (p==2) //|| Or! (3==2) ! Non-//function test2 (x) { return x+1; } Y=2;test2 (2) //result is 2+1=3
Note: JavaScript cuts the score number!
Introduction to JavaScript