Skip to content

Commit 12476ce

Browse files
(pass == '') have to return wrong pass msg
По заданию (если там не ошибка в переводе) на пустой ввод только для имени надо выводить отменено, а для пароля - не верный.
1 parent 4e4571e commit 12476ce

File tree

1 file changed

+2
-2
lines changed
  • 1-js/02-first-steps/11-logical-operators/9-check-login

1 file changed

+2
-2
lines changed

1-js/02-first-steps/11-logical-operators/9-check-login/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ if (userName == 'Админ') {
99

1010
if (pass == 'Я главный') {
1111
alert( 'Здравствуйте!' );
12-
} else if (pass == '' || pass == null) {
12+
} else if (pass == null) {
1313
alert( 'Отменено' );
1414
} else {
1515
alert( 'Неверный пароль' );
1616
}
1717

18-
} else if (userName == '' || userName == null) {
18+
} else if (!userName) {
1919
alert( 'Отменено' );
2020
} else {
2121
alert( "Я вас не знаю" );

0 commit comments

Comments
 (0)