The password is entered through the text if the password is incorrect, then delete body and "the password is not correct" if correct, then "the password is correct"
var text = document.getElementById("password") var body = document.getElementById("body") function checkPassword(){ if(text.value === "Hack"){ text.value = "The password is correct" } else { body.innerHTML = "The password is not correct" } }