September 11, 2006
Oh thank goodness someone finally wrote this. I was afraid one day that I’d have to write something similar, but then only do a half-ass job at it. This will be an excellent reference post where I can point people to when trying to explain scope.
I enjoyed your subtitles “Where am I? And who are you?... this? What’s that?” – You have no idea how many times that pops into my head. The end result (because of a closure) always end up the same:
var that = this;