ECMA-262 Core: JavaScript Miscellaneous Statements

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

Introduction And Review

We have unofficially termed his group of JavaScript statements as "miscellaneous statements". The miscellaneous statements are a "catch all" for all JavaScript statements that do not fit the other two statement groups. These statements are not core statements nor are they expression statements.

The Miscellaneous Statements Table

Miscellaneous Statements
Statement Name Keyword or Symbol Purpose
function statements function The function statement declares and defines a function.
compound statements comma The comma operator may be used to create compound statements.
nested blocks Two or more
block statements
{ }
The core block statement can be nested.
The block statement is used to create compound statements. Some core statements (if/else, switch, try/catch/finally) have the block feature built in. The function statement also uses the block statement feature. The block statement feature can be inserted in your code independent of other statements to group one or more consecutive statements together.
constant const The "const" keyword will initialize a constant. Constants can not be changed. It is like a variable but variables can be changed. The "const" is not officially ECMA-262 but is a reserved word and is recognized in most modern browsers.
comment statements //
Lets not forget the comment statement. The interpreter bypasses the comment statements. It serves as a documentation aid for programmers. // causes all text to the right to be ignored thru to the end of the line. /*....*/ is a blocked comment. All lines between the symbols are ignored.


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