I feel like I'm doing some noobish overlooking of things. Can anyone help me understand why the following doesn't work
["1.1", "2.2", "3.3"].map(parseInt);
//=> [1, NaN, NaN]
This works though ???
["1.1", "2.2", "3.3"].map(function(num) {
return parseInt(num);
});
//=> [1, 2, 3]
This seems to work too
["1.1", "2.2", "3.3"].map(Number);
//=> [1.1, 2.2, 3.3]