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++) {
// condition to continue
if (i == 3) {
continue;
}
console.log(i);
}
for (let i = 0; i < 10; i++) {
if (i === 3) { break; }
text += "The number is " + i + "<br>";
}