Function Return


orangeCost() function doesn't return 25 when the cost of an orange is 5.

my code is :slight_smile:
var orangeCost = function (price){

console.log("price of orange is::" +(price*5));



You've got no return statement, so it isn't going to return anything, just like it says.

Actually, the return value is going to be undefined which is a value that represents a lack of value


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