Ask coding questions

← Back to all posts
Alert Sign-UP Demo [Help]
Codemen (4)
<button onclick="myFunction()" id="signup">Signup</button>
<script>
    document.getElementById("demo").let age = prompt('How old are you?', 100);
alert(`You are ${age} years old!`); // You are 100 years old!
let gender = prompt('Whats your gender?', 'Guest')
alert(`Your gender is ${gender}!`)
let username = prompt('Whats your username in-game?', 'Guest 1')
if(confirm(`Your username is gonna be ${username}`)) {
let password = prompt(`Whats your password?`)
confirm(`You want your password to be ${password}?`);
} else { 
txt = "Process ended."
}
</script>

this code hasnt been working, why?

Comments
hotnewtop