0

I have a big problem in front of me. I have to build soft that works on every modern browser and... IE8. Internet explorer can't see variables declared before function.

Model.something = function() {
  var someVariable = "something";
  (...)
  function process(err, data) {                 
    console.log(someVariable);     //internet explorer can't see this variable
  };
};

In every browser even in documentation I have, that JS see variables declared before. In IE8, this rule doesn't exist, anyone have any simple ideas? Any help will be much appreciated.

Pikachu
  • 1,973
  • 3
  • 20
  • 27

1 Answers1

5

IE8 isn't complaining about someVariable. It's complaining about console, which is undefined in IE8. See this question for more details.

Community
  • 1
  • 1
jonathan.cone
  • 6,592
  • 2
  • 30
  • 30