"What's your age?" pops up twice?


#1

The program has allowed me to move one to the next lesson, however, when I run the code, the "what's your age?" dialogue box pops up twice. I'm not sure what I did wrong.

confirm("Are you ready to play?");// Check if the user is ready to play!

var age=prompt("What's your age?");

prompt("What's your age?");

if(age<13)
{
console.log("You are allowed to play, but I take no responsibility.")
}
else{
console.log("Play on!")


#2

If you look over your code, you're telling the computer to prompt twice. Deleting the second prompt("What's your age?"); will fix this.