Reserved Words in JavaScript | Explained

Reserved Words in Javascript

In this article, we will see about reserved words in javascript.

What are reserved words?

The reserved words are Keywords. Their meaning and purpose are already defined within the javascript, for ex: the ‘var’ keyword is used to create variables. Keywords must be written in the lowercase letter. Keywords should not be used as identifiers or user-defined names. user-defined means programmer-defined names should not be keywords. For naming variables, constants, arrays, functions, objects, etc. do not use keywords. There are around 50 keywords in javascript.

Keywords in Javascript

typeof
var
const – used to create constants in javascript
var – used to create javascript variable
null
undefined
true
false

Keywords for controlling the flow of execution of the code

if
else
switch
case
for
while
do
in
break
continue

Keywords for exception handling

try
catch
throw
finally

Keywords for work with the object

new
delete
this
instance of

Leave a Reply