Skip to content

Instantly share code, notes, and snippets.

@lgsunnyvale
Created December 7, 2012 08:14
Show Gist options
  • Select an option

  • Save lgsunnyvale/4231729 to your computer and use it in GitHub Desktop.

Select an option

Save lgsunnyvale/4231729 to your computer and use it in GitHub Desktop.
compiled javascript code from coffee to show difference between thin arrow and fat arrow
(function() {
var A,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
A = (function() {
function A(msg) {
this.msg = msg;
this.fat = __bind(this.fat, this);
}
A.prototype.thin = function() {
return alert(this.msg);
};
A.prototype.fat = function() {
return alert(this.msg);
};
return A;
})();
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment