(D.R.Y.) function help


#1


Need a little bit of help with this. Not sure why it's throwing me an Unexpected token error, but I am also a beginner. What exactly am I doing wrong? Am I headed in the right direction or am I completely missing something. Thanks.

https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/1/1?curriculum_id=506324b3a7dffd00020bf661#


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


#2

you assign a function like this:

var x = function(param) {

}

now look at yours


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.