1, it is determined:
If the determination 0, false, empty string, undefined, null converted to false. Other converted into all true.
2 ternary expression :( Starter trinocular operation, ternary operator) if the
Syntax: Expression 1? Expression 2: Expression 3;
Condition (boolean)
true expression of time to go 2
false when walking Expression 3
3, loop: repeat to execute a section of code within the conditions
for,for in,foreach,forof,while,dowhile
break; exit the loop
continue; this cycle out
4, function: the package code, the code is a set of
Like naming convention rules and variables: function name
Parameters: parameter (formal parameters), the type parameter may be limited, the number may not be limited.
Function body: Code function is called when the execution of
return: the return value, if not written, underfined is returned.