Control Statements
if (control_expression) single_or_compound_statement [else single_or_compound_statement]
switch(expression) { case value1: statement_sequence_or_compound_statement case value2: statement_sequence_or_compound_statement ... [default: statement_sequence_or_compound_statement] }Note that in a JavaScript switch statement, the control expression may evaluate to a number, string, or boolean value. The case values may therefore also be numbers, strings, or boolean values, and they don't all have to be the same kind of value.
while (control_expression) statement_sequence_or_compound_statement
do statement_sequence_or_compound_statement while (control_expression);
for (init_expr; control_exp; increment_or_decrement_expression) statement_sequence_or_compound_statementIn the above for-statement both multiple expressions and (global) declarations are possible.
for (var someVariable in someObject) statement_sequence_or_compound_statement