This chapter has introduced each of the statements of the JavaScript language. Table 5.1 summarizes these statements, their syntax, and their purpose.
break;
Exit from the innermost loop.
continue;
Jump to top of containing loop.
;
Do nothing.
for (initialize ; test ; increment) statement
Easy-to-use loop.
for (variable in object) statement
Loop through properties of object.
function funcname([arg1 [..., argn]]) { statements }
Declare a function.
if (expression) statement1 [ else statement2 ]
Conditionally execute code.
return expression;
Return a value from a function.
var name_1 [ =index.html value_1 ] [ ..., name_n [ =index.html value_n]] ;
Declare and initialize variables.
while (expression) statement
Basic loop construct.
with (object) statement
Specify the current name space.
.