Codecademy: JavaScript Lessons- 1- Choosing Your Own Adventure
Create your very own JavaScript program with ease with the help of Codecademy and I (Thecodeacademy) as we go through how to create windows using Javascript.
Check out my main YouTube Channel- http://www.youtube.com/user/Henry1502inc
Tutorial: How to build a javascript application with jsc.
http://jsc.sourceforge.net/tutorials/NatureBoyTestPad.Tutorial.htm
—————————————————————–
Google+ – https://plus.google.com/u/0/117921439741993201518/posts
Facebook – https://www.facebook.com/pages/Thecodeacademy/351070148337126
Xbox – Henry1502
Instagram – http://instagram.com/henry1502nc
Twitter – https://twitter.com/TheCodeAcademy
StumbleUpon – http://www.stumbleupon.com/stumbler/henry1502inc
Java Tutorials Coming Soon.
Follow me on Twitter- Henry1502inc and thecodeacademy
Tweets by Henry1502inc
Tweets by TheCodeAcademy
—————————————————————–
New videos every Monday, Thursdays and Saturdays- 3pm to 8pm.
Original source
29 responses to “Codecademy: JavaScript Lessons- 1- Choosing Your Own Adventure”
Help please, this is my code
var feedback = prompt ("Rate 1-10");
if (feedback >= 8){
console.log ("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}else {console.log ("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");}
I keep getting
Oops, try again. It looks like you didn't print the less than or equal to 8 message.
// Check if the user is ready to play!
confirm("are you ready to play?");
var age = prompt("how old are you?");
if (age <= 13) {
console.log("you're allowed to play");
}
else{console.log("Play at your own risk!");
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Justin on stage?");
if (userAnswer = "Yes");
{
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!")
}else{console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'"); }
syntax error!
hellllllppppp wats wrong w/
// Check if the user is ready to play!
confirm( "I understand confirm!" );
var age = prompt( "How old are you?" );
if (age>=13)
{
console.log( "You are SUPER OLD by da wayyy" );
}
else
{
console.log( "OH YEHHHHHH" );
}
thank you very much!
THANKS!!! I SUBBED CAUSE YOU HELPED ME I WAS DYING WITH FRUSTRATION! THANKS :D!
Thank you so much. I was so stuck until I watched this
Thanks for the help.
lesson 2 its saying i havent checked for the users age
Help me please:
// Check if the user is ready to play!
confirm("Are you ready to play? Click OK to continue");
var age = prompt("what's your age?");
if(age <= 13);{
cosole.log("You're allowed to play but i take no responsibility!");
} else {console.log("HAVE FUN!");}
it gets the red x on the else statement
what the difference between
write a function,
call a function
define a function and
declare a function??
This is quite easy and ive been doing it 2 hrs?
Thanks for helping me out man 😀
Epic64ds try adding a semi colon after the console.log that may help
confirm("I am ready to play!");
var age = prompt("What's your age?");
if (age < 18) {
console.log("You Allowed To Play");
} else
(console.log("Play on"));
Is answer 😉
// Remember, the order and punctuation matter.
// If you get an error, check carefully, line by line.
// If you're really stuck, see the hint!
If ( 3 > 5 )
{
console.log("I am right")
}
else
{
console.log("I am wrong")
}
It keeps telling me there is problem with else.
It says expected an identifier and saw 'else' instead
Please help
in row 7 i write this: else { console.log("good luck,have fun!");} but there is a red bot with x on left side and when i mouse over it it says: Expected an identifier and instead saw 'else'. Missing ";" before statement. How do i fix this???
Thanks Dude It Helped
Help This Is My Script It Says SyntaxError: Unexpected Token Else
// Check if the user is ready to play!
confirm("ARE YOU READY TO PLAY THE BEST GAME OF YOUR LIFE!");
var age = prompt ("Whats Your Age");
if (age >= 18);
{console.log("Your Old Enough To Play This Game We Hope You Have The Best Experience Possible");
}else{
console.log("Play On");}
you dont need to declare age the first time because it is already being
declared through your prompt message. Also missing a semicolon after confirm line, also Did you want it to Display yes if the age is greater than 18? If so, you have that backwards in your if else statement.
Hope This Helps!
Helppp Pleaase
// Check if the user is ready to play!
confirm("Are you ready to play? :)")
var age = 18;
var age = prompt("How old are you?");
if (age <= 18) {
console.log("Yes");
} else {
console.log("No");
}
I went back and tried my code again and it worked so heres my source code
——————————–
Look at my video description for a link to my facebook page for the source code I wrote
I also did all the instructions correctly and i still received a message saying "Did you define a variable called age?" And this is the code I input
var age = prompt('What's your age?');
if (age <= 18){
(console.log("you are allowed to play and enjoy this game however I take no responsiblity");
}else{
(console.log("You meet the required age you can now play the game")}
Please respond I have been stumped on this for quite some time now
i keep getting: ''missing operand, found else''…..
Thanks, This helped
inbox me your code because I just went through my code and it worked just fine when I reviewed it today
I did everything too, and it says i need to declare a variable called feedback, can u please help? ill send u my code. thx
i need your help i have tired to fix my code to look like your and it odes but it still isnt working its saying syntax error need your help!
i added a link to a tutorial, tell me if it was what you wanted
I fucking punched my own face… Wish i found this first.