Stuck on D.R.Y


Hi all, I am stuck on this exercise. Would really appreciate any help. Thank you!


... function doesn't return 25...

Your function is logging the amount, along with some embellished text, neither of which are asked for in the instructions.

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

The above is all we are asked for. Nothing more. Notice that we return a value, and do no logging in this exercise? Many exercises are like this so do your utmost to follow the instructions as closely as possible. It will make the course easier to get through.

Of course, once we pass a lesson, we are free to tinker with it and experiment. We will not lose the checkmark we earned.


Thank you for your help!!


In that Lesson, Just remove "total cost=" in console.log("total cost=" + price);


console.log ( price );

It will work fine. The Answer/Output they need is 25.. not "total cost=25"


Thank you for your help.


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