It is asking me if i declared my variable, What should I do?


#1

confirm('Are you ready')
var age = prompt('What is your age?')
if('age is lees than 13'>=true) {
console.log('You are not old enaugh to play but it is not my responsability!')
}
else{
console.log('You are old enaugh to take your own decisions!')
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'")
userAnwser = prompt("Do you want to race Bieber on stage?")


#2

HI this line

if('age is lees than 13'>=true)

the string says to check if age is less than 13 it will look like that
In this case I will check if a variable named fred is great than 12

if ( fred > 12)

then here

userAnwser = prompt("Do you want to race Bieber on stage?")

it's missing the var before userAnwser
Hope that could help you.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.