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


#1


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


var orange= function orangeCost(price)
{
var cost=price*5;
return (cost);
}

orange(5)

Oops, try again. It looks like you didn't define orangeCost.


please help me

Replace this line with your code.


#2

it says to log the result to the console.


#3

Wrong syntax, should be:

var orangeCost = function (price) {
   var cost=price*5;
   return (cost); // here you need to log variable cost
};

#4

@denys.matsevych explained it better


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.