I'm reading the source from [mongoose](https://github.com/LearnBoost/mongoose/blob/master/lib/collection.js#L40)

```
Collection.prototype.onOpen = function () {
  var self = this;
  this.buffer = false;
  self.doQueue();
};

```

I don't understand why the author assigns `this` to `self` and runs `self.doQueue()`. Why not just run:

```
this.buffer = false;
this.doQueue();

```

I'm new to javascript, thanks for help.