Problem with next task


#1

Hello! I can not decide a regular job, who can help, what went wrong?
My task:
On line 7, after the equals sign, call the function timesTwo with any parameter you want
Line 8 prints out newNumber. Notice how the value we return from timesTwo() is automatically assigned into newNumber.

My code:

// Parameter is a number, and we do math with that parameter
var timesTwo = function(number) {
return number * 2;
};

// Call timesTwo here!
var newNumber = function (timesTwo) {
console.log(newNumber);
return newNumber*2;
};
timesTwo (8);


#2

a function call is one line:

functionName(arguments)

you do it here:

timesTwo (8);

now all you need to do is store the result of the function call in newNumber


#3

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