Skip to content

Commit bf230df

Browse files
authored
improve description
Change the order between ´body´ and ´step´. Also delete the phrase '... but before the condition check', which seems a bit confusing.
1 parent 4d30548 commit bf230df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/02-first-steps/12-while-for/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ Let's examine the `for` statement part-by-part:
108108
|-------|----------|----------------------------------------------------------------------------|
109109
| begin | `i = 0` | Executes once upon entering the loop. |
110110
| condition | `i < 3`| Checked before every loop iteration. If false, the loop stops. |
111-
| step| `i++` | Executes after the body on each iteration but before the condition check. |
112111
| body | `alert(i)`| Runs again and again while the condition is truthy. |
112+
| step| `i++` | Executes after the body on each iteration. |
113113

114114
The general loop algorithm works like this:
115115

0 commit comments

Comments
 (0)