Skip to content

Instantly share code, notes, and snippets.

@fdjones
Created November 16, 2017 23:25
Show Gist options
  • Save fdjones/efd841cb3f8bc62df50f674b8f970805 to your computer and use it in GitHub Desktop.
Save fdjones/efd841cb3f8bc62df50f674b8f970805 to your computer and use it in GitHub Desktop.
// class
class foo {
constructor(a, b) {
this.a = a;
this.b = b;
}
bar() {
return true;
}
}
// object literal
function foo(a, b) {
return {
a: a,
b: b,
bar: function () {
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment