Reputation: 3
code as below:
function(){ log1(); function log1(evt) { alert("1"); } }();
on firefox 8, nothing happend, and error log1 is not defined shown in firebug console. The code could be executed succeeded on Chrome and IE9.
Upvotes: 0
Views: 44
Reputation: 707546
It works fine in Firefox 8.0 like this:
(function (){
log1();
function log1(evt) {
alert("1");
}
})();
You can see it work here: http://jsfiddle.net/jfriend00/2QYHJ/
Upvotes: 0
Reputation: 4769
Your function can not be executed. you can make it like this way:
(function(){
log1();
function log1(evt) {
alert("1");
}
})();
Upvotes: 1