Do you know what will be the output of this code?
JavaScript
console.log(1 === "1", 1 == "1");
Show answer and explanation
The answer is false true.
=== (strict equality) compares type and value, and a number is never equal to a string. == (loose equality) converts the string "1" to the number 1 first, so the comparison is true.
Prefer === to avoid surprises.