Monthly Archives: March 2015

Self Vs. That

In order to make sure I’m referencing the intended JavaScript object I’ve always set self to equal this:

var self = this

I’ve recently seen that used instead of self. I know why we need a way to keep a reference for this. I don’t know why we have to have this = self = that. Objective-C already has self as this.

Why did we have to introduce a third word?