D.R.Y #6 Dont Repet YourSelf


#1

I Dont Know What i did wrong i will supply with screen shot


#2

Put the * 5 when defining the function, rather than putting it in the actual function.
so;
var blankCost = function (cost * 5)


#3

Your are multiplying a function by 5. Function * 5 != Number. Use cost, not orangeCost.


#4

Then This is what happens


#5

it still does not work


#6

this does not make sence


#7

i still need help with this can some one else help?


#8

@mpglenn1202 This is never syntactically right, you NEVER operate in a function's input.

@codecrtr The way you should do it is:

var orangeCost = function(cost) {
    console.log("Your orange cost is: " + cost * 5);
}

#9

Oh sorry about that, still a bit new to coding!


#10

Please, do not suggest if you don't know.


#11

Thanks @cadecodes That Did The Trick!


#12

Sorry, it's just that I thought that I knew so I gave my input


#13

We're an open forum here everyone can pitch in with their answers :slightly_smiling:

And if their answer turns out to be wrong then we get to help 2 people at once rather than just the original poster so everyone benefits!

Alex