It wont put anything in the console, but it says "way to go!"


#1

The console (i think that's what it is called from console.log) doesn't return anything, But it says "Way to go!"
Here is my code:

var orangeCost() = function (price) {
var val = price * 5};
orangeCost("$5.00")


#2

var orangeCost() = function (price) {

Remove the () after orangeCost.
You need to add console.log after you make the variable price.

var val = price * 5;
console.log (val);

$5.00 is not a definable number, it's a string. Also, it seems you are trying to give the orangeCost a "price" value in two locations.
Instead of:

orangeCost("$5.00")

You should give it a number of oranges you want buy.

orangeCost(5)

I hope that answers your question.


#3

enter link description here


#4

Thank you now it is logging it :relieved: