Skip to content

Instantly share code, notes, and snippets.

@newbenhd
Created June 18, 2019 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newbenhd/42d9da7bdc001cb442c647d2bbaca3f0 to your computer and use it in GitHub Desktop.
Save newbenhd/42d9da7bdc001cb442c647d2bbaca3f0 to your computer and use it in GitHub Desktop.
Prototype Inheritance
function createArray() {
this.array = [];
}
createArray.prototype.push = val => {
this.array.push(val);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment