Skip to content

Instantly share code, notes, and snippets.

@dmikis
Created August 21, 2012 17:45
Show Gist options
  • Save dmikis/3417784 to your computer and use it in GitHub Desktop.
Save dmikis/3417784 to your computer and use it in GitHub Desktop.
Class vs Mixin
// class
function Foo() {};
Foo.prototype.foo = function () {};
// mixin
var Bar = {
__init: function () {},
bar: function () {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment