Error console.log is not a function? Why it doesn't work?


#1

Introduction to Functions in JS lesson 10

var my_number = 7; //this has global scope

var timesTwo = function(number) {
var my_number = number * 2;
console.log("Inside the function my_number is: ");
console.log(my_number);
} ;

timesTwo(7);

console.log("Outside the function my_number is: ");
console.log(my_number);


#2

Your code is correct :slight_smile:

Try to:

  1. copy your code;
  2. click Reset Code;
  3. click Save & Submit Code;
  4. paste your code back into the editor;
  5. click Save & Submit Code again.

#3

Thanks, I reload page and it work's.:slight_smile:


#4

You're welcome! :slight_smile:

Sometimes codecademy is more stubborn than this time :wink:


#5

It was look like that. I look for the mistake 2 hours:slight_smile: