Answers

Question and Answer:

  Home  Front End Developer (AngularJS)

⟩ Explain difference between == and ===?

This is pretty simple but at the same time some people never came across a triple equals or never wondered what's the difference.

Double equals == is used to compare the value of two operands:

"2" == 2; // true

2 == 2; // true

Triple equals === is used to compare the value AND type of two operands:

"2" === 2; // false

2 === 2; // true

 279 views

More Questions for you: