Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Проверка логина
- // https://learn.javascript.ru/task/check-login
- let login = prompt("Enter your login", "here");
- if (login == "admin") {
- let password = prompt("Enter your password", "here");
- if (password == "admin") {
- console.log("Hola")
- } else if (password == null) {
- console.log("Cancelled")
- } else {
- console.log("Wrong password")
- }
- } else if (login == null) {
- console.log("Cancelled")
- } else {
- console.log("Undefined User")
- }
Advertisement
Add Comment
Please, Sign In to add comment