Who wants to race Justin Bieber?


#1

Hello, Guys !! It seems like these hard tasks are endless ! Let's see one more ?

How could you solve that:

Oops, try again. Did you remember to console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); ?

I did so:

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
confirm("Are you ready?");// Check if the user is ready to play!
var age = prompt("What's your age");
if(age < 13 ) {
console.log("you're allowed to play but you are only one responsible");
} else {
console.log("CONGRATS! YOU'VE JUST GROWN UP!");
var userAnswer = prompt("Do you want to race Bieber on stage?");
console.log("Suddenly, Bieber stops and says,'Who wants to race me?'");
}


#2

console.log("Suddenly, Bieber stops and says,'Who wants to race me?'");
                                            ^^

You missed a single space between those two characters. Unfortunately that does make a difference.


#3

UNBELLIEVABLE, man. You must do that all day long, don't you ???? Thanks a ton !!!


#4

It's hardest doing anything with coding until you get use to paying attention to detail, CodeCademy is frustrating but teaches that well. I've been programming for several years and I still have a hard time with this aspect, but soon you'll see patterns and you can quickly evolve to meet the standards set by coding.

On a tangent, that's why most variables are named with the second word being capitalized like so:

var myFriend;

Many programmers also use different techniques for each coding language such as using an underscore or Full capitalization to determine what type of variable they are dealing with

var myFriend1 = 1;
var MYFRIEND2 = "String";
var my_Friend = new Object();

In advanced programs this makes recognizing the type of variable you utilize to become much more apparent without going into depth on what kind of variable it is (ie var myFriendInteger, or var myFriendObject = new Object())

I hope this helps!


#5

Hi, You're nice, but there's another issue We have to break out:

SyntaxError: Unexpected end of input

Oops, try again. There was a problem with your syntax

for: ( to be continued)....

}
if(userAnswer = "yes") {
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
} else {
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");


#6

Could you add all of the code you have right now to your post? I can't help much if I don't see everything you have.


#7

Wow. you are really good at finding small differences! :hushed: