Javascript Tutorial
Javascript Tutorial Introduction to Javascript JavaScript Code Editors & IDE JavaScript Hello World Example Javascript Syntax and Rules syntax_rules javascript_identifiers JavaScript Keywords & Reserved Words javascript_variables JavaScript Const JavaScript let vs var vs const Data Types in JavaScript JavaScript String Template Literals & String interpolation in JavaScript Tagged Templates in JavaScript String to Number in JavaScript Number Data Type in JavaScript NaN in JavaScript JavaScript Number Min & Max & Safe Values JavaScript EPSILON & Floating point precision Infinity in JavaScript JavaScript Bigint BigInt Vs Number in JavaScript Boolean Data Type in JavaScript Undefined in JavaScript Null in JavaScript Null vs Undefined in JavaScript JavaScript Operators Arithmetic Operators in JavaScript Unary plus & minus operators in JavaScript Increment & Decrement Operators in JavaScript Comparison or Relational operators in JavaScript Strict Equality (==) Loose Equality (===) in JavaScript Ternary Conditional Operator in JavaScript Logical Operators in JavaScript Bitwise Operators in JavaScript Assignment Operators in JavaScript Nullish Coalescing Operator in JavaScript Comma Operator in JavaScript Typeof JavaScript Operator Precedence in JavaScript JavaScript if, else & nested if statement Switch Statement in JavaScript While & Do While Loops in JavaScript For Loop in JavaScript Break statement in JavaScript Continue Statement in JavaScript Arrays in JavaScript Array Constructor in Javascript Sparse Array Vs Dense Array in JavaScript How to merge Arrays in JavaScript Array Methods in JavaScript Functions in JavaScript Function Parameters & Arguments in JavaScript JavaScript Default Parameters Pass by Value and Pass by Reference in Javascript Function Expression in Javascript Nested Functions in JavaScript Immediately-invoked Function Expressions (IIFE) JavaScript Callback Functions Arrow Functions in JavaScript Arguments Object In JavaScript Rest Parameters in JavaScript Objects in Javascript Create Objects in JavaScript JavaScript Object Properties Computed Property Names in JavaScript Object Literal in JavaScript Constructor Function & New Operator in JavaScript Delete Operator in JavaScript hasOwnProperty in JavaScript Using Getters and Setters in Javascript DefineProperty in JavaScript JavaScript Property Descriptors Enumerable, Writable & Configurable Object Destructuring in JavaScript Variable Scope in JavaScript Hoisting in JavaScript Lexical Scope & Closures in JavaScript This in JavaScript Global Object, Window & Globalthis in JavaScript Call function in Javascript Prototype In Javascript Prototype Inheritance in JavaScript Instanceof Operator in JavaScript Spread Operator in JavaScript

JavaScript Keywords & Reserved Words

JavaScript Keywords have a special meaning in the context of a language. They are part of the syntax of JavaScript. These are reserved words and we cannot use them as JavaScript Identifier names. Using them will result in a compile error.

List of Reserved Words

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

* The null , true , and false are not keywords but literals, but we cannot use them as identifiers as they have special meaning.

*** We cannot use , await only when we use it inside a Module.

*** , arguments, , get, , set are not keywords, but they do have special meaning in some contexts. Hence better avoid them

List of Strict Mode Reserved Words

You cannot use the following reserved keywords only if you enable strict mode.

For Example

The following works although we used let as the variable name.

                            
let let=2;
console.log(let)          //2

                            
                            
                        

But enabling the strict mode will result in an error.

                            
"use strict"
 let let=2;                //Unexpected strict mode reserved word
 console.log(let)
                            
                            
                        

The following is a list of strict mode-only reserve words.

Strict Mode Reserved Words
arguments eval implements
interface let package
private yield

Future Reserved Words

The following keywords do not have any special meaning now. But they may be used in some times in the future. Hence they cannot be used as identifiers.

Reserved Words
abstract boolean byte
char catch double
float goto int
long native short
synchronized throws transient
volatile

Other Keywords that you must avoids

The NaN, Infinity, and undefined are not reserved keywords in JavaScript But you must avoid using them. They are properties of the global object and have special meanings. Although they are immutable & read-only properties, JavaScript does not throw any errors if you declare them in the global scope.

Read More

  1. JavaScript Tutorial
  2. JavaScript Hello World Example
  3. Syntax and Rules
  4. JavaScript Identifiers
  5. Keywords & Reserved Words
  6. JavaScript Variables
  7. Constants in JavaScript
  8. Let, var & const