Front End Developer (AngularJS) Question: Download Front End Developer (AngularJS) PDF

Explain difference between == and ===?

Tweet Share WhatsApp

Answer:

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

Download Front End Developer (AngularJS) PDF Read All 62 Front End Developer (AngularJS) Questions
Previous QuestionNext Question
Tell me what is CoffeeScript?How can you add a method to a class already defined?