Output from Node.js repl:
> ["1", "2"].map(i => parseInt(i)); // correct
[ 1, 2 ]
> ["1", "2"].map(i => i); // correct
[ '1', '2' ]
> ["1", "2"].map(parseInt); // what is causing the NaN?
[ 1, NaN ]
Should not the last result be [1, 2]
?
Version:
$ node --version
v6.9.1