Appendix C. Reserved Words

The following words can’t be used as an identifier (the name of a variable, constant, property, or function) in JavaScript:

  • await (reserved for future use)

  • break

  • case

  • class

  • catch

  • const

  • continue

  • debugger

  • default

  • delete

  • do

  • else

  • enum (reserved for future use)

  • export

  • extends

  • false (literal value)

  • finally

  • for

  • function

  • if

  • implements (reserved for future use)

  • import

  • in

  • instanceof

  • interface (reserved for future use)

  • let

  • new

  • null (literal value)

  • package (reserved for future use)

  • private (reserved for future use)

  • protectd (reserved for future use)

  • public (reserved for future use)

  • return

  • super

  • static (reserved for future use)

  • switch

  • this

  • throw

  • true (literal value)

  • try

  • typeof

  • var

  • void

  • while

  • with

  • yield

The following words were reserved in ECMAScript specifications 1–3. They are no longer reserved words, but I discourage their use, as JavaScript implementations may (incorrectly) consider them reserved words:

  • abstract

  • boolean

  • byte

  • char

  • double

  • final

  • float

  • goto

  • int

  • long

  • native

  • short

  • synchronized

  • transient

  • volatile

Get Learning JavaScript, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.