Question 2: Old Enough to Play "


#1


Even in the Hint it's example shows {} curly braces  for question 2: Old Enough to Play "Code Your Own Adventure!"
if(age is less than 13) 
{
    // do this code
}
else   // "otherwise"
{
    // do this code
}

// Check if the user is ready to play!
confirm("Are you ready to play!");

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

if (age < 13) 
console.log("Your allowed to play but we take no responsibility");

else
console.log("What an exciting new game. Press play and be the first to play");

Thanks for the links guys, trust me when I say I read it  4 times & thought I do feel close I still don't get it

Replace this line with your code.


#2

http://stackoverflow.com/questions/4797286/are-curly-braces-necessary-in-one-line-statements-in-javascript

http://stackoverflow.com/questions/7117873/do-if-statements-in-javascript-require-curly-braces

http://stackoverflow.com/questions/2125066/is-it-bad-practice-to-use-an-if-statement-without-brackets


#3

Ok thanks rcodeman I kind get it a bit more after having some sleep the
reading them last three links.

Thanks for your time and that you can on that it will not be wasted as I
will persevere in to enfinity code world and find employment. I just love
it!


#4

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