Adding Some Story


#1


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

TypeError: console.log is not a function

confirm("User, are you ready to play?");
var age = prompt("What's your age?")
if(age < 13)
{
    console.log("Sorry you are to young for the horror of my mind! If you go crying to your mummy it's not my fault!");
}
else
{
    console.log("Hope you survive through the horror of my twisted mind!");
}
//Introduction
    console.log("You are journalist from midwestern America that flew all the way to England to see 'The House of Terror'. You plan to figure out what is going on to give it such a name!");

I've looked through and through and still don't know what I'm doing wrong! Please will someone explain what I'm messing up on?


#2

Hi try to refesh the page..
you get that kind of error when you do something like that

console.log = ("Hello word");

then when you remove the = you will get this error
TypeError: console.log is not a function
and to remove it you just need to remov the = then refesh the page


#3

I did what you suggested and it said 'Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!'


#4

Can you post the code you have now?


#5

Sure

confirm("User, are you ready to play?");
var age = prompt("What's your age?")
if(age < 13)
{
    console.log("Sorry you are to young for the horror of my mind! If you go crying to your mummy it's not my fault!");
}
else
{
    console.log("Hope you survive through the horror of my twisted mind!");
}
console.log = ("You are journalist from midwestern America that flew all the way to England to see 'The House of Terror'. You plan to figure out what is going on to give it such a name!");

#6

Again this line

console.log = ("You are journalist from midwestern America that flew all the way to England to see 'The House of Terror'. You plan to figure out what is going on to give it such a name!");

remove the = then refresh the page (And it's better if you copy directly the intro instead of re-write it.)


#7

I changed my code and got this error, Oops, try again. It looks like you didn't print the introduction.

confirm("User, are you ready to play?");
var age = prompt("What's your age?")
if(age < 13)
{
    console.log("Sorry you are to young for the horror of my mind! If you go crying to your mummy it's not my fault!");
}
else
{
    console.log("Hope you survive through the horror of my twisted mind!");
}
console.log("You are journalist from midwestern America that flew all the way to England to see 'The House of Terror'. You plan to figure out what is going on to give it such a name!");

#8

You should use the intro they gave ou in the introdution

console.log("You are journalist from midwestern America that flew all the way to England to see 'The House of Terror'. You plan to figure out what is going on to give it such a name!");

Should be

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")

#9

Thank you, it finally worked!


#10

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