generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Ro-Sports
Home Search
 

Re: Coding help please? :)

Previous Thread :: Next Thread 
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 03:58 PM

var orangeCost = function (orangeCost) {
var price = orangeCost * 5;
console.log(orangeCost);
};



What is wrong with the code up there ^^^^ (It's in JavaScript)

Thank you! (This is really frustrating btw)

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
thomasm1 is not online. thomasm1
Joined: 20 Apr 2009
Total Posts: 3968
10 Aug 2014 04:01 PM
Javascript's the one language I don't know.

Have you declared any values for the OrangeCost like input or a set value?
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 04:02 PM
Task:

You are a creature of habit. Every week you buy 5 oranges. But orange prices keep changing!

You want to declare a function that calculates the cost of buying 5 oranges.
You then want to calculate the cost of the 5 all together.
Write a function that does this called orangeCost().
It should take a parameter that is the cost of an orange, and multiply it by 5.
It should log the result of the multiplication to the console.
Call the function where oranges each cost 5 dollars.

@Thomasm

How do you do that again?

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
10 Aug 2014 04:03 PM
var orangeCost = function (orangeC) {
var price = orangeC * 5;
console.log(orangeC);
};

idk try that
Report Abuse
jimbobucky is not online. jimbobucky
Top 100 Poster
Joined: 01 Jun 2008
Total Posts: 71233
10 Aug 2014 04:03 PM
This forum is now the coding forum
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 04:05 PM
"Oops, try again. It looks like you didn't call the orangeCost function. Make sure to call it and pass it a price!"

That's the error it sent me @Mario.

One thing I wish about Codecademy is that it would give you more feedback on what you did wrong and have a button to give you the answer lol..

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
thomasm1 is not online. thomasm1
Joined: 20 Apr 2009
Total Posts: 3968
10 Aug 2014 04:17 PM
Wow, Codecadamey looks awesome. Thanks for mentioning it
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 04:17 PM
No problem! It helps you a lot though tbh.

Btw, I got the code! :D

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
FIRECAKE is not online. FIRECAKE
Joined: 28 Feb 2009
Total Posts: 25167
10 Aug 2014 04:21 PM
trying out some HTML/CSS with codeacademy, thanks for the recommendation dark
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 04:22 PM
You're welcome. :)

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
10 Aug 2014 04:25 PM
I know HTML, LUA and am learning Java.
Report Abuse
thomasm1 is not online. thomasm1
Joined: 20 Apr 2009
Total Posts: 3968
10 Aug 2014 04:29 PM
HTML is the easiest language out the lot in my opinion.

I made one in school when my English class was in IT typing up essays. Mainly about how one of my friends got corrected over EVERYTHING in his essay, I have lost the USB drive that I put that on :(.
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 04:30 PM
Yeah HTML is SO easy now that I look back at it.

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
FIRECAKE is not online. FIRECAKE
Joined: 28 Feb 2009
Total Posts: 25167
10 Aug 2014 05:06 PM
HTML seems pretty easy, it's all just learning the syntax i guess
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 05:07 PM
Yeah, pretty much.

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
10 Aug 2014 05:08 PM
HTML is easy

i think Lua is easier tho
Report Abuse
ebenton95 is not online. ebenton95
Joined: 06 Nov 2011
Total Posts: 9671
10 Aug 2014 05:16 PM
well if this is like anything i've learned from roblox's lua, calling a function is when you put the function again at the end of it sort of like this:

var orangeCost = function (orangeCost) {
var price = orangeCost * 5;
console.log(orangeCost);
};

function(insert some price here)

idk about the passing it a price and i havent done lua scripting on here in a while but it should be along the lines of that. Hope that helped in some sort of way.

Whatever price you put in the line at the end will be what goes in for orangeCost throughout the function.
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 05:21 PM
@eb

Lol, I already finished the code xD

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
ebenton95 is not online. ebenton95
Joined: 06 Nov 2011
Total Posts: 9671
10 Aug 2014 05:24 PM
o well good for u then :P
Report Abuse
darksideadmin is not online. darksideadmin
Joined: 22 Oct 2011
Total Posts: 9053
10 Aug 2014 05:24 PM
Thanks though. :/

Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter}
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Ro-Sports
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image