Appendix A. Reserved words

 

The CoffeeScript compiler maintains a list of reserved words that will break compilation if you use them as variable names in a program.

For CoffeeScript 1.6.3 the reserved words list appears in table A.1.

Table A.1. CoffeeScript compiler 1.6.3 reserved words
case
default
function
var
void
with
const
let
enum
export
import
native
__hasProp
__extends
__slice
__bind
__indexOf
implements
interface
package
private
protected
public
static
yield
true
false
null
this
new
delete
typeof
in
arguments
eval
instanceof
return
throw
break
continue
debugger
if
else
switch
for
while
do
try
catch
finally
class
extends
super
undefined
then
unless
until
loop
of
by
when
and
or
is
isnt
not
yes
no
on
off

Some of the reserved words in CoffeeScript are reserved because the compiler uses them in the generated JavaScript. Others are reserved because they���re reserved words in the ECMAScript specification, as shown in tables A.2 and A.3.

Table A.2. Reserved words in the fifth edition of the ECMAScript specification
break
do
instanceof
typeof
case
else
try
return
void
continue
for
switch
while
this
with
default
if
throw
delete
in
new
var
catch
finally
debugger
function

There are some words that are reserved for future editions of the ECMAScript specification, as shown in table A.3. Some of them, such as class, also have meaning in CoffeeScript. Don���t use them as identifiers.