7. Return Keyword - Print out Value


Currently stuck on the return keyword portion

I have this code:

var newNumber = timesTwo = function(number) {return number * 2;};

I'm receiving the error message that "It looks like you didn't print out the value of newNumber"

<img src="//codecademy-discourse.s3.amazonaws.com/original/4X/b/4/3/b439224d85e0e1278519677e9461dcbfc45f8eb2.png" width="690" height="444">

Any advice on what i could be doing wrong? Thanks!


Hi you begin with this code

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

// Call timesTwo here!
var newNumber = 

then they aske you
On line 7, after the equals sign, call the function timesTwo with any parameter you want
SO in this line

var newNumber =

you should put after the equals sign the call function of function timesTwo like that

var newNumber = timesTwo(8); #you can out any number you like instead of 8


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