This part is slightly different from java, so be careful when learning
1. operators:
1) arithmetic, relational, logic, value assignment, bit operations] refer to c ++ and java to learn why it starts with "java !).
2) dot operations, new operations, patent operations on objects, no need to worry!
3) typeof (variable)], type judgment operator.
4) operator precedence]. This is boring for development. Please check it yourself!
2. expression:
Operator + common variables, and "Combination" of results, the result type is not separated from the "first lesson" content. It is the basic unit of a "statement.
3. Statement:
The feature ending with ";" only requires line breaks)
The statement can be summarized as follows ):
1) Value assignment, declaration, and definition of variables
2) call a function or Method
3) return of a function or Method
4) define the loop or branch structure
5) structure definition of functions or methods
4. Branch Structure:
1) if... else
2) switch (Number)... case (value 1)... case (value 2)... default...
5. Loop Structure:
1) for (var I = 0; I <100; I ++) {...} // counting cycle
2) while (expression ){...}
Do {} while (expression );
3) for (var m in array) {...} // corresponds to java's for... each
This article from the "Yu yu" blog, please be sure to keep this source http://johnyu.blog.51cto.com/7838287/1299618