declare.js
function( fn ){

          // Get the object's base
          var objectBase = getObjectBase( this, fn );

          // If the function is not found anywhere in the prototype chain
          // there is a pretty big problem
          if( ! objectBase.base ) throw new Error( "inherited coun't find method in chain (getInherited)" );

          // At this point, I know the key. To look for the super method, I
          // only have to check if one of the parent __proto__ has a matching key `k`
          var p = Object.getPrototypeOf( objectBase.base );
          return p[ objectBase.key ];
        }
function( fn ){

          // Get the object's base
          var objectBase = getObjectBase( this, fn );

          // If the function is not found anywhere in the prototype chain
          // there is a pretty big problem
          if( ! objectBase.base ) throw new Error( "inherited coun't find method in chain (getInherited)" );

          // At this point, I know the key. To look for the super method, I
          // only have to check if one of the parent __proto__ has a matching key `k`
          var p = Object.getPrototypeOf( objectBase.base );
          return p[ objectBase.key ];
        }
function ( fn ) { // Get the object's base var objectBase = getObjectBase ( this , fn ) ; // If the function is not found anywhere in the prototype chain // there is a pretty big problem if ( ! objectBase . base ) throw new Error ( "inherited coun't find method in chain (getInherited)" ) ; // At this point, I know the key. To look for the super method, I // only have to check if one of the parent __proto__ has a matching key `k` var p = Object . getPrototypeOf ( objectBase . base ) ; return p [ objectBase . key ] ; }
This will become a method call, so `this` is the object
This will become a method call so this is the object