Merge pull request #209 from usernamehw/patch-6

Spacing
This commit is contained in:
Ilya Kantor 2017-09-27 00:48:28 +03:00 committed by GitHub
commit d9cc4012f4

View file

@ -8,8 +8,8 @@ for (let i = 0; i < 5; i++) alert( i );
That can be easily deducted from the algorithm of `for`:
1. Execute once `i=0` before everything (begin).
2. Check the condition `i<5`
1. Execute once `i = 0` before everything (begin).
2. Check the condition `i < 5`
3. If `true` -- execute the loop body `alert(i)`, and then `i++`
The increment `i++` is separated from the condition check (2). That's just another statement.