> xs = ['10', '10', '10'] > xs.map(parseInt) [10, NaN, 2] Javascript is beautiful.
var xs = ['10', '10', '10'];
xs.map(function (str) {
return parseInt(str, 10);
});
> [10, 10, 10]
Fixed that for you. Why? map callback params: (value, index, originalArray)
parseInt params: (string, radix)
Your code is passing the map array index to parseInt's radix.