Skip to content

Instantly share code, notes, and snippets.

@yckart
Last active December 19, 2015 19:39
Show Gist options
  • Save yckart/6007815 to your computer and use it in GitHub Desktop.
Save yckart/6007815 to your computer and use it in GitHub Desktop.
Reserved keywords in JavaScript http://mathiasbynens.be/notes/reserved-keywords

#ECMAScript 1

In the beginning, there was ECMAScript 1. It listed the following reserved words:

do
if
in
for
new
try
var
case
else
enum
null
this
true
void
with
break
catch
class
const
false
super
throw
while
delete
export
import
return
switch
typeof
default
extends
finally
continue
debugger
function

#ECMAScript 2

Later, ECMAScript 2 added int, byte, char, goto, long, final, float, short, double, native, public, static, throws, boolean, package, private, abstract, volatile, interface, protected, transient, implements, instanceof, and synchronized.

do
if
in
for
int
new
try
var
byte
case
char
else
enum
goto
long
null
this
true
void
with
break
catch
class
const
false
final
float
short
super
throw
while
delete
double
export
import
native
public
return
static
switch
throws
typeof
boolean
default
extends
finally
package
private
abstract
continue
debugger
function
volatile
interface
protected
transient
implements
instanceof
synchronized

#ECMAScript 3

ECMAScript 3 introduced no changes in the list of reserved keywords — it’s identical to the ECMAScript 2 keywords.

#ECMAScript 5

ECMASCript 5/5.1 removed int, byte, char, goto, long, final, float, short, double, native, throws, boolean, abstract, volatile, transient, and synchronized; it added let and yield.

do
if
in
for
let
new
try
var
case
else
enum
eval
null
this
true
void
with
break
catch
class
const
false
super
throw
while
yield
delete
export
import
public
return
static
switch
typeof
default
extends
finally
package
private
continue
debugger
function
arguments
interface
protected
implements
instanceof

#ECMAScript 6

At the time of writing, the latest ECMAScript 6 draft still lists the same reserved keywords as in ECMAScript 5/5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment