Error in D.R.Y, Introduction to Functions in JS


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

I get the error message above, but the console does print "The cost is 25".

"What seems to be the problem, officer?" :slight_smile:

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



HI just remove the string keep just this part

console.log(price * 5);


Oh, lol. Thanks, man. That did the trick :slight_smile:


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