Skip to content

Commit f3886cf

Browse files
committed
up
1 parent 835d2ae commit f3886cf

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Ответ: `1`.
1+
The answer: `1`.
22

33
```js
44
//+ run
@@ -9,18 +9,19 @@ while (i) {
99
}
1010
```
1111

12-
Каждое выполнение цикла уменьшает `i`. Проверка `while(i)` даст сигнал "стоп" при `i = 0`.
12+
Every loop iteration decreases `i` by `1`. The check `while(i)` stops the loop when `i = 0`.
1313

14-
Соответственно, шаги цикла:
14+
Hence, the steps of the loop make the following sequence ("unrolled"):
1515

1616
```js
17-
var i = 3
18-
alert( i-- ); // выведет 3, затем уменьшит i до 2
17+
var i = 3;
18+
19+
alert(i--); // shows 3, decreases i to 2
1920

20-
alert(i--) // выведет 2, затем уменьшит i до 1
21+
alert(i--) // shows 2, decreases i to 1
2122

22-
alert(i--) // выведет 1, затем уменьшит i до 0
23+
alert(i--) // shows 1, decreases i to 0
2324

24-
// все, проверка while(i) не даст выполняться циклу дальше
25+
// done, while(i) check stops the loop
2526
```
2627

1-js/2-first-steps/15-while-for/1-loop-last-value/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Последнее значение цикла
1+
# Last loop value
22

33
[importance 3]
44

5-
Какое последнее значение выведет этот код? Почему?
5+
What is be the last value alerted by this code? Why?
66

77
```js
88
var i = 3;

0 commit comments

Comments
 (0)