1、==
It means of the same value.(相同的值)
2、===
It means of the same value and type.(相同的值和类型)
eg: var a = 1;
var b = 1;
var c = "1";
if(a == b){
console.log("a and b have same value");
if(a === b){
console.log("a and b have same value and type");
}else{
console.log("a and b have same value and different type");
}
}else{
console.log("a and b have different value");
}
if(a == c){
console.log("a and c have same value");
if(a === c){
console.log("a and c have same value and type");
}else{
console.log("a and c have same value and different type");
}
}else{
console.log("a and c have different value");
}
output : a and b have same value
a and b have same value and type
a and c have same value
a and b have same value and different type