Neither.
But for the sake of argument, I'd rather see
['10','10','10','10'].map(Number);But for the sake of argument, I'd rather see
['10','10','10','10'].map(Number);this is one is correct
['10','10','10','10'].map(String);
this one makes sense
['10','10','10','10'].map(Object);
i'd like somebody to explain me this one ?????????
Javascript is really difficult as soon as one try to do non trivial stuffs.
typeof Number("10")
//=> "number"
typeof new Number("10")
//=> "object"
The same applies to other wrapper objects, that is, Boolean and String.