News for hackers. Stuff that matters.
Re:Don't use functions as callbacks unless they're designed ... by kuschku on Sunday February 07, 2021 @06:37AM (#26054327)
> I'm most curious as to who uses the last argument in the JS map function!

array.map((val, index, {length}) => if (index + 1 == length) { alert("last element") } else { alert("element #"+index) })

There are no comments on this comment yet.