JavaScript’s reserved words

This page lists those words that are reserved by the JavaScript language for its use. The reserved words have a very specific meaning to JavaScript. Because these words are part of the language, you cannot use these words, for example, to name your variables or functions. This list is alphabetized for your convenience.

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

Here’s a complete table of JavaScript’s reserved words, categorized by their purpose (keywords, future reserved words, and literals):


JavaScript Reserved Words (Keywords)

CategoryReserved Words
Value Keywordstrue, false, null
Declarationvar, let, const, function, class
Control Flowif, else, switch, case, default, for, while, do, break, continue, return
Error Handlingtry, catch, finally, throw
Object-Orientednew, this, super, extends, instanceof, typeof, delete, in, with
Async/Awaitasync, await, yield
Strict Modeimplements, interface, package, private, protected, public, static

Future Reserved Words

(Not currently used but reserved for future versions of JavaScript)

| enum | export | import | await (in modules) |
| abstract | boolean | byte | char |
| double | final | float | goto |
| int | long | native | short |
| synchronized | throws | transient | volatile |


Avoid Using These as Identifiers!

These words cannot be used as variable names, function names, or labels.

Examples of Invalid Usage:

let class = "SyntaxError";   // ❌ Error! 
const enum = { value: 1 };  // ❌ Error! 
function throw() { }        // ❌ Error! 

Full Alphabetical List

For quick reference, here’s an A-Z list of all reserved words:

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


Key Notes:

  1. Strict Mode Adds More Restrictions:
    • arguments, eval cannot be reassigned.
    • implements, interface, etc., are reserved in strict mode.
  2. Module-Specific Reserved Words:
    • await is only reserved in module contexts.
  3. Avoid Conflicts:
    • Even if some words (like let) are newer, older browsers may treat them as invalid.