0 votes
in JavaScript by
What's the output?
for (let i = 1; i < 5; i++) {
  if (i === 3) continue;
  console.log(i);
}
  • A: 1 2
  • B: 1 2 3
  • C: 1 2 4
  • D: 1 3 4

1 Answer

0 votes
by

Answer: C

The continue statement skips an iteration if a certain condition returns true.

Related questions

0 votes
asked Mar 7 in JavaScript by DavidAnderson
0 votes
asked Feb 26 in JavaScript by DavidAnderson
...