Comparative operators

Comparative operators are a collection of binary operators that always return Boolean derived from a comparison between the two operands:

  • Abstract equality (a == b)
  • Abstract inequality (a != b)
  • Strict equality (a === b)
  • Strict inequality (a !== b)
  • Greater than (a > b)
  • Greater than or equal to (a >= b)
  • Less than (a < b)
  • Less than or equal to (a <= b)
  • Instance of (a instanceof b)
  • In (a in b)

Each of these operators has slightly different functions and coercive behavior so it's useful to go through each of them individually.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.91.254