This commit is contained in:
Ilya Kantor 2017-06-17 17:20:45 +03:00
commit ae1a1a0941
6 changed files with 6 additions and 6 deletions

View file

@ -268,7 +268,7 @@ Operators `++` and `--` can be placed both after and before the variable.
Both of these records do the same: increase `i` by `1`.
Is there any difference? Yes, but we can only see it if we use the retured value of `++/--`.
Is there any difference? Yes, but we can only see it if we use the returned value of `++/--`.
Let's clarify. As we know, all operators return a value. Increment/decrement is not an exception here. The prefix form returns the new value, while the postfix form returns the old value (prior to increment/decrement).

View file

@ -235,7 +235,7 @@ The combination: "infinite loop + `break` as needed" is great for situations whe
## Continue to the next iteration [#continue]
The `continue` directive is a "lighter version" of `break`. It doesn't stop the whole loop. Instead if stops the current iteration and forces the loop to start a new one (if the condition allows).
The `continue` directive is a "lighter version" of `break`. It doesn't stop the whole loop. Instead it stops the current iteration and forces the loop to start a new one (if the condition allows).
We can use it if we're done on the current iteration and would like to move on to the next.

View file

@ -79,7 +79,7 @@ function showMessage() {
alert(message);
}
showMessage(); // Hello, my name is John
showMessage(); // Hello, John
```
The function has full access to the outer variable. It can modify it as well.