JavaScript statements begin with a "reserved keyword" and perform a specific task. For example, the "var" keyword instructs the browser to create a variable. This article provides a list of the keywords used in JavaScript. It is important to remember that a "variable" or "function" cannot use keywords. This is another interactive reference to use as you learn to write JavaScript statements.
Future reserved keywords
The following are reserved as future keywords by the ECMAScript specification. They have no special functionality at present, but they might at some future time, so they cannot be used as identifiers.
These are always reserved:
enum
The following are only reserved when they are found in strict mode code or async function bodies::
implements
interface
let
package
private
protected
public
static
yield
The following are only reserved when they are found in module code:
await
The following are only reserved when they are found in strict mode:
let
Future reserved keywords in older standards
The following are reserved as future keywords by older ECMAScript specifications (ECMAScript 1 till 3).
abstract
boolean
byte
char
double
final
float
goto
int
long
native
short
synchronized
throws
transient
volatile
Additionally, the literals null
, true
, and false
cannot be used as identifiers in ECMAScript.