Number 6 error


#1


Help me I try to get it to 25 and the console says it's 25 twice, but codecademy doesn't accept it


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

https://www.codecademy.com/es/courses/javascript-beginner-es-WIk0w/1/1?curriculum_id=50d3cc1bca413c863600126d#


#2

change the name of the variable
from orangeCost to costoNaranjas
and this line

console.log(val);

use return keyword instead of console.log

return val

now you have to call the function by function name


#3

ur code isnt working, it says syntax error


#4

Hi,
I've got the same (twice and not accepted), when I wanted to put something like console.log('price is " + val)
when I used only console.log(val); everything went ok.
I copied your code and now (nov 12, your code was accepted)
Ziemek


#5

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