Skip to content

Commit 2893f1f

Browse files
authored
Translated solution.md
1 parent 62b7b30 commit 2893f1f

File tree

1 file changed

+7
-7
lines changed
  • 1-js/02-first-steps/12-while-for/3-which-value-for

1 file changed

+7
-7
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
**The answer: from `0` to `4` in both cases.**
1+
**Atsakymas: nuo `0` iki `4` abiem atvejais.**
22

33
```js run
44
for (let i = 0; i < 5; ++i) alert( i );
55

66
for (let i = 0; i < 5; i++) alert( i );
77
```
88

9-
That can be easily deducted from the algorithm of `for`:
9+
Tai galima labai lengvai nustatyti iš `for` algoritmo:
1010

11-
1. Execute once `i = 0` before everything (begin).
12-
2. Check the condition `i < 5`
13-
3. If `true` -- execute the loop body `alert(i)`, and then `i++`
11+
1. Įvykdyti vieną kartą `i = 0` prieš visa kita (pradžia).
12+
2. Patikrinti sąlygą `i < 5`
13+
3. Jeigu `true` -- įvykdyti ciklo korpusą `alert(i)`, o tada `i++`
1414

15-
The increment `i++` is separated from the condition check (2). That's just another statement.
15+
Padidėjimas `i++` yra atskirtas nuo sąlygos patikrinimo (2). Tai tik dar vienas teiginys.
1616

17-
The value returned by the increment is not used here, so there's no difference between `i++` and `++i`.
17+
Vertė grąžinta padidėjimo nėra čia naudojama, tad nėra jokio skirtumo tarp `i++` ir `++i`.

0 commit comments

Comments
 (0)