Table of contents
The following are keywords and may not be used as variables, functions, methods, or object identifiers, because ECMAScript specifies special behavior for them:
breakcasecatchcontinuedebuggerdefaultdeletedoelsefinallyforfunctionifininstanceofnewreturnswitchthisthrowtrytypeofvarvoidwhilewith
Words reserved for possible future use
The following are reserved as future keywords by the ECMAScript specification. They have no special functionality at present, but they might at some future time, so they cannot be used as identifiers. These keywords may not be used in either strict or non-strict mode.
The following are reserved as future keywords by the ECMAScript specification when they are found in strict mode code, except that let and yield have their traditional Mozilla-specific functionality in code compiled as JavaScript 1.7 or greater:
Note that while const is reserved as a future keyword by the ECMAScript specification, Mozilla and most other browsers implement it as a non-standard extension that may be standardized in a future version of ECMAScript. Further, export and import were once implemented in Mozilla but have returned to reserved status in recent releases.
Additionally, the literals null, true, and false are reserved in ECMAScript for their normal uses.
Reserved word usage
Reserved Words actually only apply to Identifiers (vs. IdentifierNames) . As described in es5.github.com/#A.1, these are all IdentifierNames which do not exclude ReservedWords.
a.import
a["import"]
a = { import: "test" }.
On the other hand the following is illegal because it's an Identifier, which is an IdentifierName without the Reserved Words. Identifiers are used for FunctionDeclaration and FunctionExpression.
function import() {}