What is wrong with my code?


#1
var orangeCost = function (price) {

console.log(price * 5)
}
orangeCost(5);
}


#2

plz help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


#3

What exercise it this? What errors are you getting? What have you tried?

We can't give you code, but we can help you figure out your problem. I already see the issues in your code, but answer my questions above so I can help and explain everything for you.


#4

i dont know it wont work i think its write


#5

Okay.. What exercise is this and what error do you get?


#6

use semicolons ";" to finish function definition
there is one "}" too much at the end


#7

At least you have an unnecessary } at the end of your code.
Also @jaaakee is right it would help a lot if you could:

"Not working", "should be right", may be valid descriptions but this is a Q&A forum for beginners so that part is kind of obvious and the valuable information would be those that are not obvious.


#8

So, the function var ends with } on the 3rd lines.

The 4th line is for calling a function, so no need for the extra "}"