Bieber part 4


#1

// Check if the user is ready to play!
confirm("I understand confirm");

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

if (age < 13)
{ console.log("Underaged, no responsibility will be taken");
}
else
{ console.log("Play on!");
}

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?");

var userAnswer = prompt("Do you want to race Bieber on stage?");


I get the error. "Oops, try again. Did you remember to console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); ?"
I cant what I got wrong.


#2

@bytemaster78466
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?"); in this u did't end it with '" as ' is not ended that's why..


#3

help me solve bieber part4


#4

@ruddy12 what's ur code issue??


#5

after adding this code var userAnswer=prompt ( "Suddenly, Bieber stops and says, 'Who wants to race me?' "); it still gives me an error below


#6

@ruddy12 see i think u are using wrong instruction in prompt and console, sometymes if we use different things , console doesn't take it and returns error ..

use -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?'");

var userAnswer = prompt("Do you want to race Bieber on stage?" );

use these in last after deleting what's there after completion of else statement

see then it works or we have to find other way


#7

still not working....


#8

The console is expecting an exact response. Check your spacing around the word "Bieber" and see if that helps.


#9

@lolman is rigth, @haodannyboy sometymes console wants exact response.


#10

I live in the jungle i don't understand


#11

@invisiblepop which part u did't understand??


#12

@ankurlvv thanks a lot it worked


#13

@ruddy12 Happy Coding!!


#14

I need help i can't find whats wrong in my code and i did everything that it asked me to do

// Check if the user is ready to play!
confirm("I am ready to play")
var age=prompt("What's your age");
if(age > 13){
console.log("Your risk of playing not my responsibility")
}
else {
console.log("Please enjoy this mediocore game")
}
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?'");
var userAnswer=prompt("Do you want to race Bieber on stage?");