demonstration code:
javascript
const arr = [1,2,3];
for (const n of arr) {
switch (n) {
case 1: console.log(n); break;
default: console.log(n); break;
}
}
Amazing! the "break" keyword won't break the for loop
demonstration code:
javascript
const arr = [1,2,3];
for (const n of arr) {
switch (n) {
case 1: console.log(n); break;
default: console.log(n); break;
}
}
Amazing! the "break" keyword won't break the for loop
For further actions, you may consider blocking this person and/or reporting abuse
Bala Madhusoodhanan -
Dayananda -
Petra Grunheidt -
Cey -
Top comments (0)