wiki/content/20201030094343-javascript_breaking_out_of_a_loop.md

254 B

date id title
20201030 3b67edf8-727e-42c4-b46d-c096b2fb350b JavaScript Breaking Out of a Loop

Syntax

for (let current = 20; ; current = current + 1) {
  if (current % 7 == 0) {
    console.log(current);
    break;
  }
}