driveyou Posted November 18, 2013 Posted November 18, 2013 Hey I'm trying to get into programming, want to learn how to create scripts eventually and im stuck on a certain part, and theres no get hint bar.. here's the instructions: So your story is really moving along! There is a scene. Your user is about to talk to Batman. You want to see if your user is ready to smackdown with Batman. Instructions Under your existing code, print out the storyline: "Batman glares at you." Then declare a variable userAnswer. Make it equal a prompt that asks the user "Are you feeling lucky, punk?". This will be the question that Batman asks your user. Here's my code: // Check if the user is ready to play! confirm("I am ready to play!"); var age = prompt("What's your age?"); if (age < 18) { console.log("Play responsibily"); } else { console.log("Play on!"); } console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him."); console.log('Batman glares at you'); var userAnswer = prompt("Are you feeling lucky, punk?"); Im not sure what im doing wrong, please help Thanks
Celeos Posted November 18, 2013 Posted November 18, 2013 Everything looks fine. You forgot a period in the var 'Batman glares at you.' Btw, this is JavaScript not Java. 1
oTroll Posted November 18, 2013 Posted November 18, 2013 Yes, everything is fine. I did this exercise on Codecademy and it was working properly. Btw, like Celestial said, this is Javascript which is used for websites. You want to learn Java for scripting :P 1
driveyou Posted November 18, 2013 Author Posted November 18, 2013 Everything looks fine. You forgot a period in the var 'Batman glares at you.' Btw, this is JavaScript not Java. oh alright, thanks! and woops my bad :P Yes, everything is fine. I did this exercise on Codecademy and it was working properly. Btw, like Celestial said, this is Javascript which is used for websites. You want to learn Java for scripting cheers man :P cody academy
Guest Falixus Posted November 18, 2013 Posted November 18, 2013 Yeah, I have been using it lately to learn Python.
3lv3nz Posted November 18, 2013 Posted November 18, 2013 Yeah, I have been using it lately to learn Python. me2
JakePully Posted December 13, 2013 Posted December 13, 2013 Looks good. Keep it up Edit: Also might look into learning on Code Academy also, looks helpful