5139 sujets

Le Bar du forum

Et un support des arrows functions:


var obj = {
  method: function() {
    var self = this;
    setTimeout(() => {
      console.log( self === this );
    }, 3000 );
  }
};

obj.method();

Modifié par SBoudrias (27 Jun 2013 - 17:23)