3 ms·
No one ever thought it would be a good idea, Contravariant. :/ It's just an unfortunate interaction between two APIs. Map's callback gets three args, and parse
by DDR0 8y ago
No one ever thought it would be a good idea, Contravariant. :/ It's just an unfortunate interaction between two APIs. Map's callback gets three args, and parseInt takes two (and ignores the third). After a while, you get used to wrapping callbacks to slough off the spare variables as shown.
In this case, the index of the element (1, 2, 3) is getting passed as the radix with which to parse the element (1, 1, 1).