2 ms·
Totally, just remember to use var. Dangerous this is much scary then accidentally adding a global variable.
by henryzhu 14y ago
Totally, just remember to use var. Dangerous this is much scary then accidentally adding a global variable.
- v413 14y agoThe problem with `self` is that it is already a predefined global variable in the browser pointing to the global object :) And btw, the `this` situation with javascript is not that bad :) use bind - either the Ecmascript 5 version or shimmed and you will be fine. Not much drama.