DEV Community

Discussion on: Tell me an unpopular software opinion

Collapse
 
jsbeaulieu profile image
Jean-Sébastien Beaulieu

I really don't like seeing people using .map for things not returning a new array. The whole concept of "mapping" comes from functional languages, or even higher, from mathematics, and always have been about "mapping" one set (your input) to another (the returned array). Discarding the output and using map as a glorified for loop makes the intention unclear.