Why variable hoisting after return works on some browsers, and some not?

Viewed 15605
alert(myVar1);
return false;
var myVar1;

Above code throws error in IE, FF and Opera stating that return statement has to come in the function. But it works (shows undefined) in Safari and Chrome.

The above code has been written in global scope. Outside all the functions.

Any reason?

5 Answers
Related