Don't Repeat Yourself D.R.Y. - why is it logging the function name?


No error messages, I passed this one with this code!
But it returns:
[Function: orangeCost]
rather than 25!
I've been looking at this for a while and I can't work out why, please can you help? :slight_smile:

var orangeCost = function(number) {
    var val = number * 5


i think you need to your function(number ) to function(price) see if that helps:D


So try putting the function and its argument inside the parentheses of the console.log statement instead


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