Jump to content

Having trouble with some code

Go to solution Solved by murpup569,
confirm("I am ready to play")

var age = prompt("What's your age")

if(age < 13)

{

console.log("You're allowed to play, but I take no responsability")

}

else

{

console.log("Let's play!")

}

Through Codecademy:

 

 

confirm("I am ready to play")

var age = prompt("What's your age")

if( < 13)

{

console.log("You're allowed to play, but I take no responsability")

}

else

{

console.log("Let's play!")

}

 

 

 

I try to run this code but it gives me a Syntax Error... Anything helps!

Link to comment
https://linustechtips.com/topic/254393-having-trouble-with-some-code/
Share on other sites

Link to post
Share on other sites

You haven't said what language it is, that would be useful

I am however going to assume it is because none of your lines have semi-colons at the end.

|| Processor: AMD Ryzen 5 2600 || RAM: 32GB (4x8GB) Corsair DDR4 Vengance (3000) || Motherboard: ASUS Prime B450-Plus || Graphics Card: Gigabyte RTX2070 || Storage: 750GB SSD (2 Drives), 3TB HDD (2 Drives) || Case: NZXT H500 || Power Supply: be quiet! Pure Power 11 600W || 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×