7/13


#1

Need help :grinning:


#2

You should try this

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

// Call timesTwo here!
var newNumber = timesTwo(5)
console.log(newNumber);

#3

For future reference please copy your code into the post so that we may help you more fully. It is nice to see a working version of the code but sometimes it is more helpful to have someone explain certain concepts if you don't understand them.


#4

Hi @kshitij760,
I m getting error for above code too :frowning:

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

could you pls help me out?


#5

Please post your code. So I may help.


#6

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

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


#7

make sure the spelling of your function is the same when you call it. You left out the s on times.