Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's no difference between for (x of a) stmt; and a.forEach(x => stmt), except for scope, and lack of flow control in forEach. There's no reason to prefer .forEach(). I don't see how it is "more functional."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: