mercredi 18 février 2015

Where "this" points to in JS and why


var Result = Result || {};

Result.Controller = function (){
var _self = this;
_self.router = new v2.Router(_self);
};


I have above code of javascript, here I want to know where will "this" points to? Is it Controller or Result? and why?





Aucun commentaire:

Enregistrer un commentaire