JavaScript sai do loop
//break out of for loop
for (i = 0; i < 10; i++) {
if (i === 3) { break; }
}
Grepper
//break out of for loop
for (i = 0; i < 10; i++) {
if (i === 3) { break; }
}
// program to print the value of i
for (let i = 1; i <= 5; i++) {
// break condition
if (i == 3) {
break;
}
console.log(i);
}