how to return from a for loop when a condition is met javascript code example
Example: loop javascript
// infinite for loop
for(let i = 1; i > 0; i++) {
// block of code
}
// infinite for loop
for(let i = 1; i > 0; i++) {
// block of code
}