
JavaScript ParseInt Tutorial - quickthrower2
https://superjavascript.com/t/javascript-parseint/
======
seyz
Nice tutorial but it would be cool to also have "WTF" stuff explained. For
example:

> parseInt('1') 1

> parseInt('2') 2

> parseInt('3') 3

> ['1', '2', '3'].map(parseInt) [1, NaN, NaN]

> ['3', '2', '1'].map(parseInt) [3, NaN, 1]

> ['1', '2', '3'].map(v => parseInt(v)) [1, 2, 3]

~~~
quickthrower2
Thanks!

I’m guessing that those are because of the index argument of map. That’s
probably worth mentioning. I’ll update the article when I can.

I mentioned a big wtf that “010” parses as 8 because of octal.

