Explain the difference between == and === in JavaScript.



Explain the difference between == and === in JavaScript...

Answer / hr@tgksolutions.com

• == (Abstract Equality) compares values without considering data type (performs type coercion).
o Example: 5 == "5" → true
• === (Strict Equality) compares both value and type.
o Example: 5 === "5" → false

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

How onclick works in javascript?

0 Answers  


What is the relationship between JavaScript and ECMAScript?

4 Answers   NIM, Satyam,


What is javascript bom?

0 Answers  


What is javascript ‘strict mode’?

0 Answers  


what is lazy fetching in hibernate

0 Answers   iGate, Infosys,


Where do you write javascript?

0 Answers  


Explain what is pop()method in JavaScript?

0 Answers  


Can I write javascript in notepad?

0 Answers  


How to get value from a textbox?

0 Answers  


What are the uses of javascript in web page designing?

0 Answers  


How to get the type of arguments passed to a function?

0 Answers  


Event handler Example

1 Answers  


Categories