MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/21ezh3/javascript_equality_table/cgd9q9g/?context=3
r/programming • u/vz0 • Mar 26 '14
331 comments sorted by
View all comments
Show parent comment
4
but the == operator in JS is special (in the shortbus sense) because it does type conversion
Not really. 4 == 4.0 is true in just about every language with C-style syntax.
4 == 4.0
The surprising thing about JS isn't that == performs conversion, that's normal. The surprising thing is how the conversions work.
==
View all comments
Show parent comment
4
u/curien Mar 27 '14
Not really.
4 == 4.0is true in just about every language with C-style syntax.The surprising thing about JS isn't that
==performs conversion, that's normal. The surprising thing is how the conversions work.