Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Code academy help? (Java)

Featured Replies

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
  1. Under your existing code, print out the storyline: "Batman glares at you."
  2. 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

Everything looks fine.

You forgot a period in the var 'Batman glares at you.' Btw, this is JavaScript not Java.

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

  • Author

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 tongue.png

 

 

cheers man :P 

 

<3 cody academy 

Yeah, I have been using it lately to learn Python. 

Yeah, I have been using it lately to learn Python. 

 

me2

  • 4 weeks later...

Looks good. Keep it up


Edit: Also might look into learning on Code Academy also, looks helpful

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.