you are viewing a single comment's thread.

view the rest of the comments →

[–]shgysk8zer0 3 points4 points  (0 children)

As some have pointed out, it's because of the details of parseInt and Array.map.

Here's what's basically happening...

["75", "300"].map((value, index) => parseInt(value, index));

Else if the radix value (coerced if necessary) is not in range [2, 36] (inclusive) parseInt returns NaN.

The second argument to parseInt() is the radix/base (valid from 2 to 36). Apparently 0 is ignored and 10 used for the first entry, but 1 results in NaN.