Return keyword


Return keyword task

Why we are still here? Just to suffer.. What's wrong with my code? I got idea of return keyword, why it's not accepting it??

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

var newNumber = timesTwo

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



You have a problem when calling the function:

var newNumber = timesTwo(6); // ... and place here
timesTwo(6) // removed it ...


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