7. Return keyword


// 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)


Stuck :confused:


To call a function, we simply specify the name and any parameters:

var newNumber = timesTwo(8);


Thank you, I managed to figure it out.


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