DEV Community

loading...

Discussion on: We Don't Need No Stinking map() or filter()

Collapse
qm3ster profile image
Mihail Malo

For the lulz you could write pushAndReturn as:

const pushAndReturn = (arr, item) => (arr.push(item), arr)