I Keep Getting This Error on "Code Your Own Adventure" Part 3


#1


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

"Oops, try again. Makes sure your sting is correct and is in between quotation marks!

confirm("I am ready to play!");
var age = prompt("What's your age?");
if(age < 13)
{console.log = ("You can play but I take no responsibility for anything that happens");
} else {
    ("You are old enough to play!");
}
console.log = ("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");


#2

Did you copy/paste the string? Looks about right...:confounded:


#3

yea I copy/pasted exactly what the instructions had


#4

I know this sounds weird, but remove all the semicolons from your console.log's.


#5

If that doesn't work then the exercise is bugged. Actually, if it does work, the exercise is bugged.


#6

the same thing popped up


#7

// Check if the user is ready to play!
confirm("To play, press OK!")
var age = prompt("What's your age");
if (age < 13) {
console.log("You are allowed to play but I assume no responsibility")
}
else {
console.log("Go ahead and play!")
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")

This worked for me, for some reason.


#8

the "your code doesn't look quite right" error message came up with that


#9

It works for me. Try copy/pasting the code above, then comparing the differences between them.


#10

If that doesn't work, you're kinda screwed.


#11

Should be

"if (age <= 13)"

The instructions to tell you to make a less than or equal to equation I believe.


#12

Mine worked as I listed. I don't think that's it, but try anyhow.

Did that work for you?


#13

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