DEV Community

Discussion on: Why can't you break out of the forEach loop?

Collapse
 
shuckster profile image
Conan

Nice explanation as to why break won’t work by writing your own version of forEach.

I know you linked to some alternatives already and this is probably familiar, but here’s an example I popped together using some / every.

Collapse
 
mayankav profile image
mayankav

@shuckster I like what you did there on zansh.in