3 ms·
IIRC `map(parseInt)` is equivalent to `map((value, index) => parseInt(value, index))` (my argument order may be wrong), which is `parseInt(string, radix)`, so y
by Arch485 4y ago
IIRC `map(parseInt)` is equivalent to `map((value, index) => parseInt(value, index))` (my argument order may be wrong), which is `parseInt(string, radix)`, so you get a different numeric base depending on the array index.
- vbezhenar 4y agoActually it's even `map((element, index, array) => parseInt(element, index, array))`. In this case `parseInt` does not use third argument but with other functions it might even make more chaos. `Array.map` function API was badly designed. I'd like to know who I should to blame for that design.
- WorldMaker 4y agoI don't think the API is that bad, just that writing "point free" in any language with loose typing is dangerous.