#7 "Intro to Functions" Help Conversation


#1

Alright, so, i'm stuck, and I'm really new at all this (Only been coding a day in Java). Anyway I'm having trouble with #7 Intro to Functions. Its about functions and returns. I'm sure ill figure it out, This is more for others. Anyway here's what I've got and the the error is 'Unexpected number'.

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

number(2);
var newNumber = function timesTwo(2)
console.log(newNumber);


#2

The above line may be removed. There is no function, number() defined.

We already have the function. This line should read,

var newNumber = timesTwo(2);
console.log(newNumber);     // 4

#3

If you mean this day, then no you haven't! That's another language!


#5

Thanks for the help.