D.r.y


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/1/1?curriculum_id=506324b3a7dffd00020bf661


I'm not sure what I'm doing wrong. This exercise has me very confused. Can anyone help me out?


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


#2

this line:

var calculate= number * 5;

where does number come from? I would use price, the function parameter.

then when you call the function:

calculate("5");

i would make sure the function call matches the name of the function. Also i would pass the argument ("5") as integer, not as string


#3

Thank you so much. It worked