My, code has an Unexpected Syntax Error [closed]

Remove the semicolon in function definition. I believe you are trying to multiply the price value by 5 and displaying it. So you should have the price variable in front of * operator.

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

orangeCost(5)

Leave a Comment