Reserved keywords in ECMAScript

by Kasper Tidemann

ECMAScript is the language in which the JavaScript dialect is spoken, so to say. And as you may know, some words are reserved for the language itself for certain behaviors, therefore rendering them unusable in your code as variable names etc.

I often find myself looking up the reserved keywords to make sure I don’t accidentically make use of one of them. For reference, here is the complete list:

List of reserved words


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

List of words that may be reserved in the future


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

So whenever you develop JavaScript, make sure not to use any of the above words and you should be all set. Happy coding!