A short example of why I hate JS so much.
Recently I concatenated two strings in Java with the || operator (I write SQL often and got confused) and I got a compiler error immediately.
The same in JS, even at runtime it doesn't throw an error, it simply converts the second string to an empty string. WTF??????
As I said "I write SQL often and got confused" and JS instead of complaining simply does "something". Event if it doesn't make any sense like in this case.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A short example of why I hate JS so much.
Recently I concatenated two strings in Java with the || operator (I write SQL often and got confused) and I got a compiler error immediately.
The same in JS, even at runtime it doesn't throw an error, it simply converts the second string to an empty string. WTF??????
Try it: alert("Hello" || " World")
As I said "I write SQL often and got confused" and JS instead of complaining simply does "something". Event if it doesn't make any sense like in this case.