DEV Community

[Comment from a deleted post]
Collapse
 
rlaffers profile image
Richard Laffers

Indeed, when you need to short circuit an iteration a much better way to iterate an array is using Array.prototype.some or Array.prototype.every instead of Array.prototype.forEach.

Collapse
 
techyniel profile image
Techyniel

Yes mate