File tree 1 file changed +8
-8
lines changed
1-js/02-first-steps/11-logical-operators/9-check-login
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
2
2
3
3
``` js run demo
4
- let userName = prompt (" Who's there ?" , ' ' );
4
+ let userName = prompt (" Kas čia ?" , ' ' );
5
5
6
6
if (userName == ' Admin' ) {
7
7
8
- let pass = prompt (' Password ?' , ' ' );
8
+ let pass = prompt (' Slaptažodis ?' , ' ' );
9
9
10
10
if (pass == ' TheMaster' ) {
11
- alert ( ' Welcome !' );
11
+ alert ( ' Sveiki !' );
12
12
} else if (pass == ' ' || pass == null ) {
13
- alert ( ' Canceled ' );
13
+ alert ( ' Atšaukta ' );
14
14
} else {
15
- alert ( ' Wrong password ' );
15
+ alert ( ' Neteisingas slaptažodis ' );
16
16
}
17
17
18
18
} else if (userName == ' ' || userName == null ) {
19
- alert ( ' Canceled ' );
19
+ alert ( ' Atšaukta ' );
20
20
} else {
21
- alert ( " I don't know you " );
21
+ alert ( " Aš jūsų nepažįstu " );
22
22
}
23
23
```
24
24
25
- Note the vertical indents inside the ` if ` blocks. They are technically not required, but make the code more readable .
25
+ Atkreipkite dėmesį į vertikalius įgilėjimus viduje ` if ` rinkinio. Techniškai jie nėra būtini, bet jie paverčia kodą lengviau skaitomu .
You can’t perform that action at this time.
0 commit comments