Puzzle time: Yes, this is not good code, but do you know why this quirk occurs? Answer will be posted (or retweeted) later :-)
Clue: An intermediate step occurs in the transformation of the supplied number.
Apr 17, 2018 · 4:53 PM UTC
Had you used #TypeScript, it wouldn't have even compiled.
parseInt isn't quirky. Implicit coercion is. parseInt doesn't even take number as the argument! It takes string!
Interesting! Just sent in a pull request with this quirk to #wtfjs github.com/denysdovhan/wtfjs… Thanks @JavaScriptDaily




















