if(23 == "23"){
console.log(" this line is inside the loop and is executed ");
}
In the above code, because of type coercion - JavaScript thinks 23 (number) and "23" (string) are the same thing. this makes the condition true and prints the console.log
在另一个案子里
if(23 === "23"){
console.log(" this line is inside the loop and is NOT executed");
}