4 ms·
Yes - that's not the point however. It's the "hoisting" that is different within those blocks. Firefox isn't hoisting based indirectly on spec. This can be ci
by clintjhill 15y ago
Yes - that's not the point however. It's the "hoisting" that is different within those blocks.
Firefox isn't hoisting based indirectly on spec.
This can be circumvented by not using function declarations and instead using variable declarations (which I believe do get hoisted in all browsers).
- nxn 15y agoI assume you mean this form: var f = function () {}; ? If so, I don't think that will circumvent the issue since only the variable declaration will be hoisted, the function being assigned will probably not be. You'd end up with 'not a function' like error when invoking instead of undefined. EDIT: Actually, I'm not sure if your last sentence is talking about the problem in the article since the person your reply was to has deleted their post. If it isn't, then disregard.