3. Adding Some Story*** Problem Solved***


#1

Can some one please help me with this. Here is my code:
I keep getting some error at the bottom of the screen that says that my strings need to be in quotation marks but everything in the console window works fine and how it should.

// Check if the user is ready to play!
confirm("Would you like to play this game?");

var age = prompt("What is your age");

if(age < 13)
{
console.log("I assume no responsibility")
}
else
{
console.log("I hope you have fun!!")
}

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


#2

Hi try to change your last console.log with that

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

In your you forgot the ' ' around

'Lace my shoes off, start racing.'

#3

Thank you so much! It's unbelievable it was something that simple.


#4

I am getting a similar error, even when I copy and paste the exact statement like the instructions say.

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


#5

try not using the = sign between console.log and (


#6

that did not help tryed it checked and just said the same thing over and over again


#7

Hi @harv16 try to Post your code and the error that you get.


#8

okay ill do it now so you can see it


#9

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


#10

Hi remove the = after all your console.log


#11

// Check if the user is ready to play!
confirm("I am ready to play!");
var age = prompt("what's your age?");
if (age < 13) {
console.log = ("you are allowed to play but I take no responsibility.");
} else {
console.log = ("Keep playing");
}
{


#12

didnt help just do it for me.


#13

Hi what error do you get?

Here

console.log = ("you are allowed to play but I take no responsibility.");
console.log = ("Keep playing");

You just have to remove the = before console.log

console.log("you are allowed to play but I take no responsibility.");
console.log("Keep playing");

And here you have a } you should remove it

else {
console.log("Keep playing");
}
{  <== this one

#14

// Check if the user is ready to play!
console.log = ("you are allowed to play but I take no responsibility.");
console.log = ("Keep playing");

console.log("you are allowed to play but I take no responsibility.");
console.log("Keep playing");

else {
console.log("Keep playing");
}
{ <== this one


#15

it didnt work so try again please


#16

Hi your code should be like that

// Check if the user is ready to play!
confirm("I am ready to play!");
var age = prompt("what's your age?");
if (age < 13) {
console.log("you are allowed to play but I take no responsibility.");
} else {
console.log("Keep playing");
}

#17

Hi my code is below, I don't know where is mistake

var age = prompt("What is your age");

if ("age is less than 13")
{
console.log("right");
}
else // "otherwise"
{
console.log("wrong");
}
console.log("You are at a justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");

it say every time
Make sure your string is correct and is between quotation marks!


#18

help me in above problem


#19

Hi this part

if ("age is less than 13")

you should change is less than to <


#20

How can i solve this?

// Check if the user is ready to play!

var age = prompt("whats your age");
if (age < 13)
{console.log('go ahead')
}

else
{
console.log('get fucked')
}

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