Created
June 18, 2019 22:03
-
-
Save newbenhd/42d9da7bdc001cb442c647d2bbaca3f0 to your computer and use it in GitHub Desktop.
Prototype Inheritance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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