for (i = 0; i < 5; i++) { // code }
for (i <= 5; i++) { // code }
for i = 1 to 5 { // code }
for (i = 0; i < 5) { // code }
break statement stops the loop, and continue skips the current iteration
continue statement stops the loop, and break skips the current iteration
Both break and continue stop the loop
Both break and continue skip the current iteration
0 1 2
0 1 2 3 4
0 1 2 3
Error
for loop
while loop
do-while loop
None of the above
foreach loop
What will be the output of the following JavaScript code?
let i = 0;while(i < 3) { console.log(i); i++;}
1 2 3
1 2
Yes, but only two levels deep
No, nesting loops is not allowed
Yes, we can nest any number of loops
Yes, but only with for loops