Type Coercion , == operator & strict equality

Type Coercion , == operator & strict equality

Table of contents

  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