Pls help Dont Repeat Yourself


#1

var orangeCost = function(price) {
}


#2

I don't understand what your question is. But, if you go back a few lessons, you can see an example of what it should kind of look like;

var greeting = function (name) {
    console.log("Great to see you," + " " + name);
};

greeting("Arnold")

you have the first part. Now, you need the console.log part. in this case;

console.log( (price)*5 );

then, after you end the reusable code, you have to call the function. in this case,

orangeCost(5)

at least, that's how I understand it.

also, remember that each line in the reusable code block has to end with a semicolon, along with your block itself. so, where you have

var orangeCost = function(price) {
}

it should be

var orangeCost = function(price) {
};

but, at the end, your full thing should look like;

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

I really hope that helped some(:


#3

Thank You very Much.


#4

Note: You forgot your semi-colon at the end go the coding :wink:


#5

I already pointed that out in my longer post up there.


#6

Can someone type out the whole code it self?