|
var orange = 5;
var orangeCost = function (price) {
console.log(orange * 5);
};
orangeCost();
|
Shouldn't it be:
var orange = 5;
var orangeCost = function (price) {
console.log(orange * price);
};
orangeCost();
I thought the point of it was that the price is always changing, hence why the function takes a parameter for the price.