mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
16 lines
239 B
Markdown
16 lines
239 B
Markdown
|
---
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
```
|