gosha gosha

Generation

generate functionSun, 12 Feb 2023

The password is entered through the prompt. If the password is incorrect, cover the whole website with black text and say, "The password is incorrect." If the password is correct, then "the password is correct."

let password = prompt("Enter Password"); if (password == "helloworld") { document.body.style.backgroundColor = "white"; } else { document.body.style.backgroundColor = "black"; document.body.innerHTML = "The password is incorrect."; }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant