DEV Community

Discussion on: Don’t use for loop for JavaScript Arrays

Collapse
sharmakushal profile image
Kushal sharma Author

yes for loop is the fastest among all the other methods. yes everything has the pro and cons we have to choose wisely what to use in which situation

Collapse
gstvds profile image
Gustavo da Silva

absolutely!

but that was a very helpful post!
I really like using map. It syntax combined with the fact that it doesn't change the original array it's very handy. If they improve async I'll definitely switch back to map (:

Thread Thread
sharmakushal profile image
Kushal sharma Author

thanks, buddy, I am also the map syntax lover. I can't imagine the React without the map

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