7 ms·
> not even knowing how JavaScript implements map in a nonstandard way that breaks simple examples FTFY. I know exactly how map works: https://en.m.wikipedia.o
by tntn 7y ago
> not even knowing how JavaScript implements map in a nonstandard way that breaks simple examples
FTFY.
I know exactly how map works: https://en.m.wikipedia.org/wiki/Map_(higher-order_function) https://en.m.wikipedia.org/wiki/Map_(higher-order_function)
This is map:
> a higher-order function that applies a given function to each element of a functor, e.g. a list, returning a list of results in the same order.
Since that is not what Array.prototype.map does, it is not map, it is some similar thing that is misnamed as map. If I wanted the index and the array as arguments, I would ask for them.