A JavaScript forEach loop can be stopped by throwing an error. To better understand how that works, it’s helpful to examine why other solutions don’t work. Here ...