JavaScript Language Specification

Basic Syntax

  1. Statements are case sensitive.
  2. Semi-colons at the end of statement are optional.

Some of the Keywords in JavaScript

  1. typeof, instanceof
  2. var
  3. true, false
  4. if, else, do, while, break, continue
  5. try, catch, finally
  6. const
  7. new
  8. null

Operators

  1. Arithmetic Operators
  2. Relational Operators (=, ==, ===, >, <)
  3. Logical Operators ( Logical and – &&, Logical Or –  ||)

Difference between “==”  and “===” operators
To compare 2 values, we can use “==” operator. But problem is that it converts type of one variable to match with another and then it compares 2 values.

Result of below comparison will be true.
“1” == 1

Result of below comparison will be false.
“1” === 1

You may also like...