Strangest language feature stackoverflow.com/questions/1995…
In JavaScript: '5' + 3 gives '53' Whereas '5' - 3 gives 2
@ThePracticalDev do you know what Array(16).join("wat" - 1) does?
@ThePracticalDev I guess because + is used for concatenating strings but minus has no such use therefore it defaults to a subtraction.
@ThePracticalDev Always loved this classic quote: quotations.amk.ca/python-quotes/…. Both Perl and Python get `print "42 monkeys"+"1 snake"` wrong 1/2
@ThePracticalDev kinda makes sense.. (or have I been doing js so long it's warped me?)
@ThePracticalDev @Fabiothebest89 and people implement crypto libraries in that batshit language
@ThePracticalDev when was last time when you sum string and int, common this is ridiculous
@ThePracticalDev This actually makes sense in JavaScript. Deal with it.
@ThePracticalDev Obviously '5' - 3 should give '5-3' because a-b = a+(-b).