2 ms·
> The index and the collection iterated over is passed as the 2nd/3rd parameters in JavaScript, Yeah, the “map and friends pass extra parameters that are usual
by dragonwriter 5y ago
> The index and the collection iterated over is passed as the 2nd/3rd parameters in JavaScript,
Yeah, the “map and friends pass extra parameters that are usually ignored” plus the “lots of JS functions optionally take extra parameters that are usually unused” makes it so easy to think of a function as a one-arg function when its really one plus multiple optionals, use it bare in a map, and get stung by it.