How to break nested loops in JavaScript? [duplicate]
This question already has answers here: What’s the best way to break from nested loops in JavaScript? (17 answers) Closed 2 years ago. I tried this: for(i = 0; i < 5; i++){ for(j = i + 1; j < 5; j++){ break(2); } alert(1); } only to get: SyntaxError: missing ; before statement So, … Read more