Why does it say i need to define orangecost?


#1

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

i thought i already defined it


#2

You are very confused on this one. orangeCost is a local variable inside a function called orangeCost. You are also logging the assignment of your local variable. Lastly, when you call your function, you are assigning some arbitrary variable that is just there to operate on. Rethink what you're trying to do, and reset the exercise.