Help needed with the code


#1


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


Hi! It says
"Oops, try again. Hmm, it looks like your orangeCost() function doesn't return 25 when the cost of an orange is 5." and the result is
"The cost is 25
The cost is 25"


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


#2

HI this line

console.log("The cost is" + " "+ cost);

remove the string

"The cost is" + " "+

#3

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