Skip to content

Instantly share code, notes, and snippets.

@fdjones
Created March 14, 2018 13:56
Show Gist options
  • Save fdjones/368e5cdd80c8abb677cb25a86ff51a82 to your computer and use it in GitHub Desktop.
Save fdjones/368e5cdd80c8abb677cb25a86ff51a82 to your computer and use it in GitHub Desktop.
// bad?
function foo() {this.stuff="stuff";}
var bar = new foo();
// good...
function foo() {this.stuff="stuff";}
function bar() {}
bar.prototype = new foo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment