Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
464 B
1
Indexable
Never
let login = "Admin";
let password = "TheMaster";
let loginInput = prompt("Enter login");
if (loginInput = login) {
  let passwordInput = prompt("Enter password");
  if (passwordInput = password) {
    alert("Welcome!");
  }
    else if (passwordInput = "" || null) {
      alert("Cancelled.");
    }
    else {
      alert("Wrong password");
    }
  }
  else if (loginInput = "" || null) {
    alert("Cancelled!");
  }
  else {
    alert("I don'\t know you.");
  }