Dont repeat yourself


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/1/1?curriculum_id=506324b3a7dffd00020bf661#

<Below this line, add a link to the EXACT exercise that you are stuck at.>
cuando envio el codigo, me dice que mi codigo no devuelve lo que tendria que devoler, pero no encuentro error en el codigo.

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

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

```

var orangeCost = function(price) {
var cost = 5 * price;
console.log(“El precio de comprar 5 naranjas es: $” + cost);
}

orangeCost(5);
<do not remove the three backticks above>

#2

You are using the console.log() method but they ask you to use the return-statement…
and
they only want you to return cost without any extra text…


#3

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