File tree 1 file changed +7
-7
lines changed
1-js/02-first-steps/14-function-basics/1-if-else-required
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ importance: 4
2
2
3
3
---
4
4
5
- # Is "else" required ?
5
+ # Ar "else" yra privalomas ?
6
6
7
- The following function returns ` true ` if the parameter ` age ` is greater than ` 18 ` .
7
+ Ši funkcija grąžina ` true ` , jei parametras ` age ` yra didesnis nei ` 18 ` .
8
8
9
- Otherwise it asks for a confirmation and returns its result :
9
+ Priešingu atveju ji prašo patvirtinimo per ` confirm ` ir grąžina rezultatą :
10
10
11
11
``` js
12
12
function checkAge (age ) {
@@ -15,13 +15,13 @@ function checkAge(age) {
15
15
* ! *
16
16
} else {
17
17
// ...
18
- return confirm (' Did parents allow you ?' );
18
+ return confirm (' Ar tėvai leido ?' );
19
19
}
20
20
*/ ! *
21
21
}
22
22
```
23
23
24
- Will the function work differently if ` else ` is removed ?
24
+ Ar ši funkcija veiks kitaip, jei ` else ` bus pašalinta ?
25
25
26
26
``` js
27
27
function checkAge (age ) {
@@ -30,9 +30,9 @@ function checkAge(age) {
30
30
}
31
31
* ! *
32
32
// ...
33
- return confirm (' Did parents allow you ?' );
33
+ return confirm (' Ar tėvai leido ?' );
34
34
*/ ! *
35
35
}
36
36
```
37
37
38
- Is there any difference in the behavior of these two variants ?
38
+ Ar yra nors vienas šio varianto elgsenos skirtumas ?
You can’t perform that action at this time.
0 commit comments