Skip to content

Commit 37e6ccb

Browse files
authored
Translated solution.md
1 parent ca57455 commit 37e6ccb

File tree

1 file changed

+5
-5
lines changed
  • 1-js/02-first-steps/12-while-for/6-repeat-until-correct

1 file changed

+5
-5
lines changed

1-js/02-first-steps/12-while-for/6-repeat-until-correct/solution.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
let num;
44

55
do {
6-
num = prompt("Enter a number greater than 100?", 0);
6+
num = prompt("Įveskite skaičių didesnį nei 100?", 0);
77
} while (num <= 100 && num);
88
```
99

10-
The loop `do..while` repeats while both checks are truthy:
10+
Ciklas`do..while` pakartoja kol abu patikrinimai yra truthy:
1111

12-
1. The check for `num <= 100` -- that is, the entered value is still not greater than `100`.
13-
2. The check `&& num` is false when `num` is `null` or a empty string. Then the `while` loop stops too.
12+
1. Patikrinimas dėl `num <= 100` -- tai yra, įvesta vertė vis dar nėra didesnė už `100`.
13+
2. Patikrinimas `&& num` yra neteisingas, jeigu `num` yra `null` arba tuščia eilutė. Tada `while` ciklas taip pat sustoja.
1414

15-
P.S. If `num` is `null` then `num <= 100` is `true`, so without the 2nd check the loop wouldn't stop if the user clicks CANCEL. Both checks are required.
15+
P.S. Jeigu `num` yra `null` tada `num <= 100` yra `true`, tad be antro patikrinimo ciklas nesustotų, jeigu lankytojas paspaustų CANCEL. Abu patikrinimai yra reikalingi.

0 commit comments

Comments
 (0)