/

List of Keywords and Reserved Words in JavaScript

List of Keywords and Reserved Words in JavaScript

In JavaScript, there are certain keywords and reserved words that cannot be used as variable identifiers. This list serves as a reference for all these keywords and reserved words:

  • await
  • break
  • case
  • catch
  • class
  • const
  • continue
  • debugger
  • default
  • delete
  • do
  • else
  • enum
  • export
  • extends
  • false
  • finally
  • for
  • function
  • if
  • implements
  • import
  • in
  • instanceof
  • interface
  • let
  • new
  • null
  • package
  • private
  • protected
  • public
  • return
  • super
  • switch
  • static
  • this
  • throw
  • try
  • True
  • typeof
  • var
  • void
  • while
  • with
  • yield

Using any of these words as variable identifiers will result in a syntax error. It’s important to avoid using them and choose meaningful and descriptive names for variables in JavaScript.

Tags: JavaScript, keywords, reserved words