Skip to content

Commit 49e24e9

Browse files
committed
Grammar cleanup.
Fixed some minor grammar issues throughout.
1 parent 5fa3d51 commit 49e24e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

loops/while.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# While Loop
22

3-
While Loops can execute a block of code as long as a specified condition is true.
3+
While Loops repetitively execute a block of code as long as a specified condition is true.
44

55
```javascript
66
while(condition){
77
// do it as long as condition is true
88
}
99
```
1010

11-
For example, The loop in this example will continue to run as long as the variable i is less than 5:
11+
For example, the loop in this example will repetitively execute its block of code as long as the variable i is less than 5:
1212

1313
```javascript
1414
var i = 0, x = "";
@@ -18,7 +18,7 @@ while (i < 5) {
1818
}
1919
```
2020

21-
The do/while loop is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true:
21+
The Do/While Loop is a variant of the while loop. This loop will execute the code block once before checking if the condition is true. It then repeats the loop as long as the condition is true:
2222

2323
```javascript
2424
do {

0 commit comments

Comments
 (0)