Javascript Reserved Keywords

When writing code, a reserved keyword is one you can’t use as the name of a variable or identifier. As of 2022, this is the full list of valid reserved keywords in Javascript.

All Javascript Reserved Keywords

The below list cannot be used a…


This content originally appeared on DEV Community and was authored by Johnny Simpson

When writing code, a reserved keyword is one you can't use as the name of a variable or identifier. As of 2022, this is the full list of valid reserved keywords in Javascript.

All Javascript Reserved Keywords

The below list cannot be used as variable names, as they are reserved keywords. Most of them have current functionality in Javascript. Some do not, but they are words which may have some sort of functionality in the future. Avoid using these words in variable names.

  • await
  • break
  • case
  • catch
  • class
  • const
  • continue
  • debugger
  • default
  • delete
  • do
  • else
  • enum
  • export
  • extends
  • false
  • finally
  • for
  • function
  • if
  • import
  • in
  • instanceof
  • new
  • null
  • return
  • super
  • switch
  • this
  • throw
  • true
  • try
  • typeof
  • var
  • void
  • while
  • with
  • yield


This content originally appeared on DEV Community and was authored by Johnny Simpson


Print Share Comment Cite Upload Translate Updates
APA

Johnny Simpson | Sciencx (2022-02-16T23:12:41+00:00) Javascript Reserved Keywords. Retrieved from https://www.scien.cx/2022/02/16/javascript-reserved-keywords/

MLA
" » Javascript Reserved Keywords." Johnny Simpson | Sciencx - Wednesday February 16, 2022, https://www.scien.cx/2022/02/16/javascript-reserved-keywords/
HARVARD
Johnny Simpson | Sciencx Wednesday February 16, 2022 » Javascript Reserved Keywords., viewed ,<https://www.scien.cx/2022/02/16/javascript-reserved-keywords/>
VANCOUVER
Johnny Simpson | Sciencx - » Javascript Reserved Keywords. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/16/javascript-reserved-keywords/
CHICAGO
" » Javascript Reserved Keywords." Johnny Simpson | Sciencx - Accessed . https://www.scien.cx/2022/02/16/javascript-reserved-keywords/
IEEE
" » Javascript Reserved Keywords." Johnny Simpson | Sciencx [Online]. Available: https://www.scien.cx/2022/02/16/javascript-reserved-keywords/. [Accessed: ]
rf:citation
» Javascript Reserved Keywords | Johnny Simpson | Sciencx | https://www.scien.cx/2022/02/16/javascript-reserved-keywords/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.