DEV Community

Discussion on: Stop using Array.map() everywhere 🥵

Collapse
 
suprabhasupi profile image
Suprabha

Yeah, my main POC was to use map method wisely. Try to use other array methods.

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

Yeah, but a map used wisely would have been better than the for, wrong example

const text = array.map((e, i) => [e,i].join(':')).join('<br>')
Enter fullscreen mode Exit fullscreen mode

Some comments have been hidden by the post's author - find out more