I have no idea what i’m supposed to write for number 6 in java script DRY


Can you place the link of the exercise?




i don’t get what i’m supposed to do


The exercise is clear. The instructions are to:

Declare a function of how much oranges cost.

var orangeCost = function(dollar) {


Then, log the cost of the 5 oranges.

var orangeCost = function(dollar) {
console.log(dollar * 5);

Then, set the cost of an orange to 5 dollars.

var orangeCost = function(dollar) {
console.log(dollar * 5);


so what is the code supposed to look like


hey @nelsona0

Read above ^ as explained by zolated, try and apply it in your lesson if you fail then show us your code and we can guide you. :slight_smile:


did that it worked im still confused about it though even if im past it on a new lesson


Which part you don’t understand ?


Why the code below does not work?

var orangeCost = function (price)
var cost = price*5;
console.log(“The price of five oranges is” + " "+ cost);



It doesn’t work in the lesson as the lesson asks you to do it in a different way so the SCT doesn’t pass it.