Spacing
This commit is contained in:
parent
d39750fc29
commit
6b61befda3
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue