Review of functions in javascript help please


#1

// 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(8));
console.log(newNumber);

?? I DON'T UNDERSTAND WHAT I AM DOING WRONG...
CAN SOMEONE PLEASE HELP ME OUT?

THANK YOU IN ADVANCE
MATHEW FROM POLAND


#2

It's too complicated you just need to call the function timesTwo(...)

var newNumber =timesTwo(8);

no need rewrite the function itself that is what the first lines are for.


#3

AAAAA OMG
THAAAANK YOU SO MUCH :smile