JavaScript Reserved Keywords
This section contains a list of all keywords that are reserved in JavaScript.
What are Reserved Keywords?
JavaScript has a number of reserved keywords. These are the words that you cannot use as identifiers (variable names, function names, and loop labels) in your JavaScript programs.
Reserved Keywords in ECMAScript 5 (ES5)
The following list shows the keywords that are reserved in ECMAScript 5. It also includes keywords that are reserved for future as well as keywords that are disallowed in strict mode.
Note: The keywords arguments
and eval
are not strictly reserved keywords, but they are treated like keywords in strict mode, so they cannot be used as identifiers. Additionally, the keywords null
, true
, and false
cannot be used as identifiers in ECMAScript.
Reserved Keywords in ECMAScript 6 (ES6)
The following list shows the keywords that are reserved in ECMAScript 6. It also includes keywords that are reserved for future as well as keywords that are disallowed in strict mode.
Future Reserved Keywords in Older Standards
The following list shows the keywords that were reserved as future keywords by the older ECMAScript specifications (before ECMAScript 5 or ES5).
Note: For optimal backwards compatibility, you should better avoid using all the keywords shown on this page as variable names or property names in your JavaScript code.