Need Help: Lesson 6 'Don't Repeat Yourself (D.R.Y)': orangeCost * 5


What is wrong with this code?

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

The cost today is 25

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


try calling the function inside a console.log() statement.


I am still confused. What is the desired outcome, a number "25" or a sentence "The cost today is 25" or something else?


Got it.

Thank you!!!


please delete the answer because we do not want give people the answer just like this.


I am not sure what is wrong with my code. It seems to work and yet it says that I didn't define orangecost.
What seems to be the problem?



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