louis's Blog

louis's Avatar Image
Software developer #Go #CommonLisp #JS #SQL. #LispWorks user. Soft spots for #Emacs #SmallWeb. Recently becoming #OpenBSD enthusiast.

Other hobbies: #Running #FireFighter #StarTrek
← All posts

When I saw this in a promo video about #javascript I thought it was a joke. Sadly, it isn’t.

A screenshot from a JavaScript browser console showing that in JavaScript, adding the string 2 to the number 2 equals to the string 22. But subtracting the number 2 from the string 2 equals to the the number 0.
A screenshot from a JavaScript browser console showing that in JavaScript, adding the string 2 to the number 2 equals to the string 22. But subtracting the number 2 from the string 2 equals to the the number 0.
To like or reply, open original post on Emacs.ch