ECMA-262 describes a set of keywords that might not be used as user-defined identifiers because they obtain some other, pre-defined, functionality.

Following table offers the complete list of keywords:

Complete list of keywords

break delete function return typof
case do if switch var
catch else in this void
continue finally instanceof throw while
default for new try with

Following mentioned keywords, there is a list of reserved words that cannot be used as identifiers as well. These words are reserved for the future purposes when they may become keywords as well.

Complete list of reserved words

abstract enum int short
boolean export interface static
byte extends long super
char final native synchronized
class float package throws
const goto private transient
debugger implements protected volatile
double import public  

 

 

 

 

 

 

 

 

›› go to examples ››