You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/12-while-for/6-repeat-until-correct/solution.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@
3
3
let num;
4
4
5
5
do {
6
-
num =prompt("Enter a number greater than 100?", 0);
6
+
num =prompt("Įveskite skaičių didesnį nei 100?", 0);
7
7
} while (num <=100&& num);
8
8
```
9
9
10
-
The loop `do..while`repeats while both checks are truthy:
10
+
Ciklas`do..while`pakartoja kol abu patikrinimai yra truthy:
11
11
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.
14
14
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