1. == : is called an equivalent character. When the types on both sides of the equal sign are the same, the value is directly compared to see if it is equal.
2, === = : is called equal, when two values of the same type, directly compare values, if the type is not the same, directly return false;
console.log(1 == '1') //true
console.log(1 === '1') //false
console.log(null == undefined) //true
console.log(null === undefined) //false
Copy the code