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."

function password(p) { if (p === "12345") { alert("The password is correct"); } else { document.body.style.color = "black"; alert("The password is incorrect"); } } var p = prompt("Enter password"); password(p);

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant