Reserved Words

JavaScript sets aside certain words that have a unique meaning and cannot be used as function or variable names, or method and object names. Some of the reserved words are in use in the current version of JavaScript or are intended for use in a future version.

The following table lists JavaScript’s reserved words.

Reserved Words    

abstract

default

goto

null

this

add

do

if

package

throw

application

double

implements

private

throws

boolean

else

imports

protected

transient

break

extends

in

public

true

byte

false

instanceof

return

try

case

final

int

short

var

catch

finally

interface

static

void

char

float

long

super

while

class

for

native

switch

with

const

function

new

synchronized

 

continue

    

Special characters to avoid when naming sections and variables:

Table 222. Reserved Characters

Reserved Characters 

<space>

'

<comma>

!

<period>

&

/

*

\

%

@

| ?
€ (euro symbol)$