Code QuizBeginner
map passes (value, index): the parseInt trap
Passing parseInt straight to map misuses the index as a radix, producing surprising NaN results.
The result is [1, NaN, NaN] instead of [1, 2, 3]. What is the bug?
Passing parseInt straight to map misuses the index as a radix, producing surprising NaN results.
The result is [1, NaN, NaN] instead of [1, 2, 3]. What is the bug?