4. First Move! SentaxError



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


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


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.


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.


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:


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


congratulation ! finally you fixed the bug


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