What is the difference between == and === ?

What is the difference between == and === ?

Double equals to compares the values  , while triple equals to compare two objects

For example:


var h1=""; var h2="";

console.log(h1==h2); // Return True

console.log(h1===h2); // Will also Return True



But now In this case where we have objects


var h1={}; var h2={};

console.log(h1===h2); // This Will return false, Object Comparision;

 

 

 

 

Vistosys
No Comments

Post a Comment

Comment
Name
Email
Website