What is wrong with my function, it won't calculate


#1

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

orangeCost = 5;


#2

where is your function call?
to call your function use

orangeCost(5);

orangeCost = 5; is an assignment

here the same:
cosonle.log = val; should be

console.log(val);