skip to Main Content

In js language when i use == it means equal but what is === …?

This question frequently arises among JavaScript developers, especially those new to the language.
i want correct answer.n general, it’s recommended to use === to avoid unintended type coercion

3

Answers


  1. Chosen as BEST ANSWER

    This question frequently arises among JavaScript developers, especially those new to the language. It addresses the distinction between the equality operators in JavaScript: == (loose equality) and === (strict equality). The == operator performs type coercion if the operands are of different types, while === checks for both value and type equality without coercion.


  2. forget about == at all, just think it does not exist

    Login or Signup to reply.
  3. == will compare value irrespective of type

    (5 == "5")
    true
    

    === will compare value with type

    (5 === "5")
    false
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search