Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var userName = prompt('Кто пришёл?', '');
- if (userName == 'Админ') {
- var pass = prompt('Пароль?', '');
- if (pass == 'Чёрный Властелин') {
- alert( 'Добро пожаловать!' );
- } else if (pass == null) { // (*)
- alert( 'Вход отменён' );
- } else {
- alert( 'Пароль неверен' );
- }
- } else if (userName == null) { // (**)
- alert( 'Вход отменён' );
- } else {
- alert( 'Я вас не знаю' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement