Cannot able to execute the below code in codeacademy console?


#1

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


var orangeCost = function(price) {
    console.log("The cost of 5 oranges"+" "+price*5);  
   
};
orangeCost(25);

as it shows 

Oops, try again. Hmm, it looks like your orangeCost() function doesn't return 25 when the cost of an orange is 5.


#2

HI this line

just remove the string

"The cost of 5 oranges"+" "+

then here

orangeCost(25);

the price is 5 and not 25


#3

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