|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 10 Aug 2014 04:03 PM |
var orangeCost = function (orangeC) { var price = orangeC * 5; console.log(orangeC); };
idk try that |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2014 04:03 PM |
| This forum is now the coding forum |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 20 Apr 2009 |
| Total Posts: 3968 |
|
|
| 10 Aug 2014 04:17 PM |
| Wow, Codecadamey looks awesome. Thanks for mentioning it |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 10 Aug 2014 04:22 PM |
You're welcome. :)
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 10 Aug 2014 05:07 PM |
Yeah, pretty much.
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2014 05:08 PM |
HTML is easy
i think Lua is easier tho |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 06 Nov 2011 |
| Total Posts: 9671 |
|
| |
|
|
| 10 Aug 2014 05:24 PM |
Thanks though. :/
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|