improve description

Change the order between ´body´ and ´step´. Also delete the phrase '... but before the condition check', which seems a bit confusing.
This commit is contained in:
cluah 2019-08-27 18:26:49 -04:00 committed by GitHub
parent 4d305484bd
commit bf230df7a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,8 +108,8 @@ Let's examine the `for` statement part-by-part:
|-------|----------|----------------------------------------------------------------------------|
| begin | `i = 0` | Executes once upon entering the loop. |
| condition | `i < 3`| Checked before every loop iteration. If false, the loop stops. |
| step| `i++` | Executes after the body on each iteration but before the condition check. |
| body | `alert(i)`| Runs again and again while the condition is truthy. |
| step| `i++` | Executes after the body on each iteration. |
The general loop algorithm works like this: