Don't Repeat Yourself (D.R.Y) I Dono what's gone wrong! NEED HELP


#1

MY CODE

var orangeCost=function(price)
{
var dollars = price * 5;
console.log('cost of 5 orange is '+ dollars);
};
orangeCost(5);

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


#2

it is because in the hint it needs only to print 25.

i also find similar issue first.

now have a try..

var orangeCost = function(price){
console.log(price * 5)
};
orangeCost(5);


#3

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