7. Return keyword


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/1/2?curriculum_id=506324b3a7dffd00020bf661


I have no Idea what to do...quite new to this so I prbly am just not doing things correctly


Replace this line with your code. 
// Parameter is a number, and we do math with that parameter
var timesTwo = function(number) {
    return number * 2;
};

// Call timesTwo here!
var newNumber = timesTwo(8){
console.log(newNumber);};
timesTwo(8);


#2

You've got unexpected tokens "{}" in this block. Remove them.

Unlike when you are defining a function in the first block where you have to define a function and then use the curly braces, in the above, you don't need them. Just define your variable and then use console.log to log it to the console.

I hope this helps! :wink:


#3

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