6. Don't Repeat


#1

Hey, it says what is says below, and I'm stumped.

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


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

orangeCost(5*5);


#2

It never directly says to use strings in your lesson, so that could do it. And it's best to do any math within the function. When I did this lesson, I did

and it worked


#3

That seemed to work for me. I think you're right, it doesn't want strings. Thanks!


#4

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