Hacker News new | ask | show | jobs
by SFjulie1 3036 days ago
Oh I thought it was about JS insanity.

Well known caveats : don't use == but ===.

What about cmp implicit operator in js?

Well, it relies on == :)

same with lt/gt

"0" === 0 false "0" < 0 false

"0" <= 0 true "0" > 0 false

WTFOMGBBQ?!!!!

The implicit type conversion mess is all over the place in JS. Changing == to === is by far not sufficient.

"<==", "==>", "truecmp" would be required to correct a tad the mess still. More correct solution would be to burn JS to the ashes at my opinion, with emacs, modern hardware, devops and startups