DEV Community

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

Collapse
sharmakushal profile image
Kushal sharma Author

It depends upon what is the situation , if i had to just loop over then i will use foreach , else if i had to do asynchorons work inside loop i swith back to the for loop , as for each doesnot support asynchonous

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