Return keyword


Oops, try again. It looks like you didn’t print out the value of newNumber

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


There is the object of interest. All that other code is fodder.

var newNumber = timesTwo(21);
console.log(newNumber);    // -> 42


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