Skip to main content

Command Palette

Search for a command to run...

Type Coercion , == operator & strict equality

Published
1 min read
Type Coercion , == operator & strict equality
  1. \== Operator uses two things that is type coercion and truthy falsy values

    • Type coercion is the automatic or implicit conversion of values from one data type to another.

    • For example, converting a string value to an equivalent number value. It is also known as type conversion.

    • Falsy values

      • Nan

      • 0

      • -0

      • undefined

      • null

Strict Equality

  1. Checks for type as well as values

  2. If type does not match then it does not check fro values

Objects

  1. For objects we check if they are referring the same object

More from this blog

Web Development

103 posts