Don't repeat yourself


#1

Hi, I have a problem with this exercise.
My function is not valid but I don't know why.

var coutOrange = function(prix) {
console.log(prix + "*" + "5" );
};

prix("2");


#2

On the last line, you're calling your parameter (prix) rather than your function (coutOrange). Change the last line to read

coutOrange("2");

and you should be good.


#3

var coutOrange = function(prix) {
console.log(prix * 5 );
};

coutOrange(2);

if you want the result write it like that :wink: !


#4

You have multiple problems in this.
1. the function is orangeCost not coutorange. You must copy paste it from instruction otherwise it will not work.
2. numbers and signs must not be in "quote". quotation is for string i.e. text.
write like
{console.log(prix*5)}