3 ms·
> 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"
by kuschku 6y ago
> 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) })