JavaScript ParseInt Tutorial
superjavascript.com
superjavascript.com
> 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]
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.