A little help with 7. Return keyword


#1

I'd like a little help here. I don't understand what it tells me to do.


#2

Can you specify what you don't understand, along with lesson url


#3

What should I put after var newNumber = ?


#4

You need to tell me what section this is, all I know is that it is lesson 7. Return keyword ..


#5

Functions and return #7.


#6

On line 7, after the equals sign, call the function timesTwo with any parameter you want

After the = you need to put timeTwo and add parenthesis, add anything you want in it


#7

So where do I put the word function?


#8

Never mind I got it.


#9

you don't need to add the word function ..
here you are calling the function which is on line 2 and 3


#10

I know, I figured it out.


#11

Okay, Help.

I cannot for the life of my figure out what I am doing wrong here. I keep getting the error: "TypeError: console.log is not a function"

  1. // Parameter is a number, and we do math with that parameter
  2. var timesTwo = function(number){
  3. return number * 2;
  4. };
  5. // Call timesTwo here!
  6. var newNumber = timesTwo(4);
  7. console.log(newNumber);

#12

HI try to resfresh the page


#13

Refreshing worked. kind of annoying that I had to think it was my bad coding, but also a good lesson that nothing's perfect.


#14

That code is correct, try using a different browser as a workaround. Nevermind

Next time, please create your own post, rather than reviving a 2 week old one.

Thanks.


#15