var -> et

This commit is contained in:
Ilya Kantor 2015-09-25 13:56:55 +02:00
parent 6a9f66ef27
commit 1d236fddf8
45 changed files with 305 additions and 295 deletions

View file

@ -2,7 +2,7 @@ The answer: `1`.
```js
//+ run
var i = 3;
let i = 3;
while (i) {
alert( i-- );
@ -14,7 +14,7 @@ Every loop iteration decreases `i` by `1`. The check `while(i)` stops the loop w
Hence, the steps of the loop make the following sequence ("unrolled"):
```js
var i = 3;
let i = 3;
alert(i--); // shows 3, decreases i to 2

View file

@ -5,7 +5,7 @@
What is be the last value alerted by this code? Why?
```js
var i = 3;
let i = 3;
while (i) {
alert( i-- );