Confirm is not working?


#1

Hello,

I've got a weird error.
For this assignment, the only thing i have to do is to ask for confirmation if the player is ready.

the example says: confirm( "I am ready to play!" );

First i tried with other strings (because the assignment told me to use whatever string i wanted.
But the error said: Oops, try again. It looks like you didn't use confirm to make sure your user is ready. Check the Hint if you need help!
I also tried it with what the hint and assignment itself used as string, but still the same error appears.
Plz help me out :smile:


#2

nevermind, the program itself found that i used too much spaces in my confirm line XD but i'll use it to keep it clean :smile:


#3

@graker,

Your Browser has its popup disabled !!!


#4

no it popped up and i clicked ok, but the error was because i tried to get my code too neat (much spacing and ■■■■).
But for me it looks better and easier do manually debug, because of the nicer structure!
Found that out later when i took the spacing away :wink: but thanks anyway!


#5

REAL CODE
confirm (" Are you ready to play ? ");
var age = prompt("What is your age?");
if (age < 13)
{
console.log("You can play this game but we are not responsible");
}
else
{
console.log("We encourage you to play this game");
}