You cannot use keywords, reserved words, true, false, and NULL as identifiers.
The keywords in JS can be used to denote the start or end of a control statement, or to perform a specific operation. By rule, keywords are also language-reserved and cannot be used as identifiers. Here are all the keywords for ecmascription (the 5th version of the New keyword with *):
Break, else, New, Var, case, finally, return, void, catch, for, switch, while, continue, function, this, with, DEFA Ult, if, throw, delete, in, try, do, instranceof, typeof, debugger*
The ECMA also describes another set of reserved words that cannot be used as identifiers. Although reserved words do not have any specific purpose in this language, they are likely to be used as keywords in the future. The following are all reserved words defined by ECMA version 3rd:
abstract, enum, int, short, Boolean, export, interface, static, Byte, extends, long, super, Char, final, NA tive, synchronized, class, float, package, throws, const, goto, private, transient, debugger, implements, Prote CTED, volatile, double, import, public
The 5th edition reduces the reserved words when running in non-strict mode to the following:
Class, Enum, extends, super, const, export, import
In strict mode, version 5th also imposes restrictions on the following reserved words:
Implements, package, public, interface, private, static, let, protected, yield
Note that let and yield are the new reserved words for the 5th edition, and the other reserved words are defined by the 3rd edition.
This digest is from "JAVASCRIPTI Senior Programmer Design (3rd edition)"
JavaScript keywords and reserved words