Revision 33677ccd-8375-4d7c-a43e-36740b7f0580 - Stack Overflow

It depends on the `JavaScript` engine that is used but according to the [Mozilla reference][1] your "this" actually references the parent object since you are returning an object.

> As an object method
>
>When a function is called as a method of an object, its this is set to the object the method is called on.
>
>In the following example, when o.f() is invoked, inside the function this is bound to the o object.

 var o = {
 prop: 37,
 f: function() {
 return this.prop;
 }
 };

 console.log(o.f()); // logs 37



 [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this

AltStyle によって変換されたページ (->オリジナル) /