This chapter is mainly about the words of the reservation
JavaScript takes some identifiers for its own keywords. Therefore, these keywords can no longer be used as identifiers in the program:
Break Delete function return typeof
Case do if switch var
Catch else in this void
Continue false instanceof Throw while
Debugger finally new true with
Default for NULL try
JavaScript also retains some keywords, which are not used in the current language version, but may be used in future versions. ECMAScript 5 retains these keywords:
Class Const Enum export extends import super
In addition, the following keywords are valid in normal JavaScript code, but are reserved words in strict mode:
Implements let private public yield
Interface Package protected Static
Strict mode also restricts the use of the following identifiers, which are not entirely reserved words, but cannot be used as variable names, function names, or parameter names:
Arguments eval
ECMAScript 3 Lists all of Java's keywords as their own reserved words, although these reserved words are relaxed in ECMAScript 5, but if you want code to run on an interpreter based on the ECMAScript 3 implementation, you should avoid using these keywords as identifiers:
Abstract double goto native static
Boolean Enum implements package Super
Byte Export Import private synchronized
char extends int protected throws
Class final interface public transient
Const float Long Short volatile
JavaScript pre-defines a number of global variables and functions and should avoid having their names used as variables and function names:
Arguments encodeURI Infinity number REGEXP
Array encodeuricomponent isfinite Object String
Boolean Error IsNaN parsefloat syntaxerror
Date eval JSON parseint TypeError
decodeURI evalerror Math rangeerror undefined
decodeURIComponent Function NaN referenceerror urierror
It is important to keep in mind that JavaScript implementations may define unique global variables and functions, and each specific JavaScript runtime environment (client, server, etc.) has its own list of global properties.
JavaScript authoritative Guide chapter II lexical structure