ECMA-262 Core: JavaScript Statement Syntax



Navigation Aids -- This Page           Navigation Aids -- This Topic           Navigation Aids -- This Site








Statement Syntax

The following table provides the syntax for the Javascript core statements. The table columns are explained here:



Statement Syntax Table



JavaScript Statement Syntax
Statement Name ECMA Syntax
Full Syntax with Options Descriptive Links
Footnotes: Green background highlights the statement keywords.
Yellow background highlights the optional portion of a statement.
My comment; not part of syntax.
block 12.1 { statements } { statements }
var 12.2 var identifier_1 [ = value_1]
[ ..., identifier_n [ = value_n]]
;
var identifier_1 [ = value_1]
[ ..., identifier_n [ = value_n]];
empty 12.3 ; ;
expression 12.4 A "catch all" for side effect expressions See Expression Statement
if 12.5 if (expression)
statement1
[else statement2]
if (expression)
statement1
[else statement2]
do-while 12.6.1 do
statement
while (expression);
do
statement
while (expression);
while 12.6.2 while (expression)
statement
while (expression)
statement
for 12.6.3 for (initialize ; test ; increment)
statement
for (initialize ; test ; increment)
statement
for-in 12.6.4 for (identifier in object)
statement
for (identifier in object)
statement
continue 12.7 continue [identifier];
this identifier is a label name
continue [identifier];
break 12.8 break [identifier];
this identifier is a label name
break [identifier];
return 12.9 return [expression]; return [expression];
with 12.10 with (object)
statement
with (object)
statement
switch 12.11 switch (expression) {
statement
}
switch (expression) {
statement
}
label 12.12 identifier: statement identifier: statement
throw 12.13 throw expression; throw expression;
try 12.14 try {
statements
}
catch (identifier) {
statements
}
finally {
statements
}
try {
statements
}
catch (identifier) {
statements
}
finally {
statements
}


Top            

Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson