Return keyword - help!


#1

I can't seem to figure out what's wrong 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 = timesTwo(8);
console.log(newNumber);

It comes up as TypeError: console.log is not a function.


#2

JavaScript may have been corrupted by an assignment such as,

console.log = newNumber;

perhaps? Refresh the page so JavaScript is restored and try again.


#3

Thanks for the help! It works now.


#4

you are right, it works!!!