O'Reilly logo
  • Nate Wittnam thinks this is interesting:

You’ll notice that the self-reference this returned from the embedded fun function returns the object a itself. This is probably what you would expect. However, observe the following:

var bObj = {name: "b", fun: function(){ return this }};

		

From

Cover of Functional JavaScript

Note

perils of this