HOw to do Javascript 6?


#1

Help Pls
My Code:
var orangeCost = function(price)
{
console.log(orangeCost * 5);
};
price(5$)


#2

Hi you should call your function orangeCost so Its should be like that

orangeCost(5)

Instead of that price(5$)
And you dont need the $ symbols.


#3

As @wizmarco, he's right about calling the function orangeCost(5) instead of price(5$).
In addition to his answer, modify also your console.log part

You should multiply: your_parameter *5.
Like this.

console.log(price*5); instead of console.log(orangeCost * 5)

Here's the whole codes, for your reference.

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