TypeError: console.log is not a function


I'm doing Return exercise but I have an error and I don't understand why. I wrote the code below and I get this message:
TypeError: console.log is not a function

I know console.log is not a function, I just want to print newNumber. What Am I doing wrong?

Thank you in advance

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

var newNumber = timesTwo(8);


Presumably you assigned something else to console.log, something that wasn't a function

console.log = 5
console.log()  // obviously not referring to a function any more

restart your environment. ie. refresh the page


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