4. First Move! SentaxError


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-x9DnD/0/4?curriculum_id=506324b3a7dffd00020bf661

Pretty simple instructions, feel pretty confident I'm following them, but it's returning the following error: "SyntaxError: Unterminated template literal"

confirm("Let's get started!");
var age = prompt("Hey! How old are you?");
if (age < 13) {
    console.log("Ok... but don't say I didn't warn you...");
}
else {
    console.log("Showtime!");
}

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


#2

Oh, and I added the ";" after console.log("You are at..."), but still no dice.


#3

It's working .I mean I just copied and pasted your code to editor and its working fine .I got the out put
any way I guess you have fixed this code.


#4

Thanks parwez-zzy - I'm still getting an error. Maybe its a browser issue - I'm jut glad to know it's not something silly in the code.


#5

you should probably copy and paste the given quotes to be printed out of console because if you type it by your own there might be some extra spacing due to which it will show error ....
Try this and if this does work then it might be browser issue :confused:


#6

Figured it out. I hadn't deleted the comment from the beginning of the exercise which worked fine until this stage of the lesson.


#7

congratulation ! finally you fixed the bug


#8

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