Introduction to Functions in JS


#1

code:
var orangeCost = function(price) {
console.log(orangeCost x 5)
}
orangeCost(5)

What am I doing wrong?


#2

two reasons, multiplying in javascript is done by a astersik (*) not x

Second, you parse the argument price into the function. You should multiply price by 5, not the function name


#3

Just have to add that it is asterisk not asterix. The rest is fine :smile:


#4

I think you meant asterisk... :smile:

Let the grammar wars begin..


#5

oops, forgive a non-native speaker for making a mistake. I edited it, now it is fine. Thank you