Appendix C. Reserved Words
The following words can’t be used as an identifier (the name of a variable, constant, property, or function) in JavaScript:
-
await(reserved for future use) -
break -
case -
class -
catch -
const -
continue -
debugger -
default -
delete -
do -
else -
enum(reserved for future use) -
export -
extends -
false(literal value) -
finally -
for -
function -
if -
implements(reserved for future use) -
import -
in -
instanceof -
interface(reserved for future use) -
let -
new -
null(literal value) -
package(reserved for future use) -
private(reserved for future use) -
protectd(reserved for future use) -
public(reserved for future use) -
return -
super -
static(reserved for future use) -
switch -
this -
throw -
true(literal value) -
try -
typeof -
var -
void -
while -
with -
yield
The following words were reserved in ECMAScript specifications 1–3. They are no longer reserved words, but I discourage their use, as JavaScript implementations may (incorrectly) consider them reserved words:
-
abstract -
boolean -
byte -
char -
double -
final -
float -
goto -
int -
long -
native -
short -
synchronized -
transient -
volatile
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access