denysdovhan / wtfjs

🤪 A list of funny and tricky JavaScript examples
http://bit.ly/wtfjavascript
Do What The F*ck You Want To Public License
34.99k stars 2.55k forks source link

An error in the paper #42

Closed SunApriloy closed 7 years ago

SunApriloy commented 7 years ago

I find an error in the explanation of 'true is false':

true == 'true'    // -> true
false == 'false'  // -> false

Actually, the result of true == 'true' should be 'false'. Because true(boolean) is saw as 1(number),but 'true'(string) is saw as NaN(number), they are different.

werts commented 7 years ago

Great!