wiki/content/20201030094343-javascript_breaking_out_of_a_loop.md

17 lines
256 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-10-30
2024-05-06 20:40:05 +00:00
id: 3b67edf8-727e-42c4-b46d-c096b2fb350b
title: JavaScript Breaking Out of a Loop
---
# Syntax
``` javascript
for (let current = 20; ; current = current + 1) {
if (current % 7 == 0) {
console.log(current);
break;
}
}
```