You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the IIFE protects from global leakage into the other scripts? But perhaps a few extra var inside sub-functions can help with garbage collection...
No, even though wrapped into IIFE, assignment to undeclared variable will result into global variable. More over in strict mode there would be "ReferenceError: assignment to undeclared variable" error.
There are several places where variable definitions lick into global scope. For example:
In the above example
ix
variable should be declared withvar
keyboard, otherwiseix
becomes global variable.The text was updated successfully, but these errors were encountered: