Ex.6


#1


Ex.6


My code repeats that the cost of the orange is 25 twice.,


var orangeCost = function (price){
console.log("Today the orange cost is" + " " + 5*price);}
orangeCost(5);


#2

The lesson checker be running the code to test it. That would explain two outputs.

Today the orange cost is 25
Today the orange cost is 25

We see there is an SCT error message,

Hmm, it looks like your orangeCost() function doesn't return 25 when the cost of an orange is 5.

This would be most likely caused by unrequested additional text output. Try,

console.log(price * 5);

with no embellishments.


#3

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