This question has already been answered:
function isTrue(){ var a = ('false' == false); console.log(a); }; isTrue(); This question has already been answered:
function isTrue(){ var a = ('false' == false); console.log(a); }; isTrue(); A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .
Check:
typeof('false'); // === 'string' typeof(false); // === boolean [] == false , with typeof([]) // object and typeof(false); // === boolean typeof(false); // === boolean so what does your answer show? - Grundyconsole.log("0" == false); Quite true , for example. - Regent== , not === . Why would the types be compared here? - Qwertiy ♦Source: https://ru.stackoverflow.com/questions/662291/
All Articles
true? - D-side'false' != false. On the one hand a line, and on the other a boolean expression. - PyramidheadStringandBooleanboth operands are cast toNumber, after which the comparison itself occurs.'false'isNaNtoNaN,falseto0. AndNaNnot equal to0. - Regent