JavaScript Reserved Keywords: 64 Terms You Can't Use!

JavaScript Reserved Keywords: 64 Terms You Can't Use!

ยท

1 min read

In JavaScript, there are 64 reserved keywords that have special meanings in the language syntax and cannot be used as identifiers (such as variable names, function names, etc.). Here is the list of these reserved keywords:

  1. abstract

  2. await (only in modules)

  3. boolean

  4. break

  5. byte

  6. case

  7. catch

  8. char

  9. class

  10. const

  11. continue

  12. debugger

  13. default

  14. delete

  15. do

  16. double

  17. else

  18. enum

  19. export

  20. extends

  21. false

  22. final

  23. finally

  24. float

  25. for

  26. function

  27. goto

  28. if

  29. implements

  30. import

  31. in

  32. instanceof

  33. int

  34. interface

  35. let

  36. long

  37. native

  38. new

  39. null

  40. package

  41. private

  42. protected

  43. public

  44. return

  45. short

  46. static

  47. super

  48. switch

  49. synchronized

  50. this

  51. throw

  52. throws

  53. transient

  54. true

  55. try

  56. typeof

  57. var

  58. void

  59. volatile

  60. while

  61. with

  62. yield

Notes:

  • Some keywords, like abstract, goto, native, synchronized, and others, are reserved for future use and are not currently implemented in JavaScript.

  • await is only reserved within modules.

  • The use of these reserved keywords as identifiers will result in syntax errors, so they should be avoided when naming variables, functions, or other entities in your code.

ย