NaN on 6/13 exercise


#1

Hi!
I don't know whats happening to my code.
It looks correct to me, but retunrs NaN...
Am I forgetting something?

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

orangeCost(5);

#2

Hi! On this one I did the following - I hope this helps you:

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

which gave the answer of 25 in the viewer screen.
So basically instead of using the word "result" I used the word "val" - I did this based on the lesson we learned on the page right before this one - page 5 of 13. If you're still having an issue let me know - and good luck!


#3

Hi! Thanks for your help!
I've found the error!!

It was in the var inside the function!
Looking to you answer I notice that I put [var result = orangeCost * ;5] instead[ var result = price * 5;] like you did.

Thank you very much, again!!


#4

No problem :smile: We're all muddling through this together! hehe :smile_cat: