var x = prompt("who's there?"); var admin = "admin" var pass = "password" if (x == admin) { var y = prompt("Password"); if (y == pass) { alert("Welcome!"); } else if (y === "cancel") { } else { alert("wrong password") } } else if (x === "cancel") { } else { alert("i dont know") }