Javascript Don't Repeat Yourself (D.R.Y)


#1

Don't Repeat Yourself (D.R.Y)
var orangeCost = function(price) {
console.log(5 * 5);
}
orangeCost("5")
I get this:
Oops, try again.Hmm, it looks like your orangeCost() function doesn't return 50 when the cost of an orange is 10.
Can somebody help me?


#2

var orangeCost = function(price) {
    console.log(5 * 5); // You need to log price * 5
}
orangeCost("5") // 5 is an integer, not a string.

#3

Thank You very much!!!


#4

No problem! Happy to help!