The password is entered through the prompt. If the password is incorrect, stop loading the website and say, "The password is incorrect." If the password is correct, then "the password is correct."
let password = prompt("Please enter the password") let allow = false if (password === "correct password") { allow = true } if (!allow) { console.log("The password is incorrect") } else { console.log("The password is correct") }