Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function extendClass(classToExtend) {
- classToExtend.prototype.species = 'Human';
- classToExtend.prototype.toSpeciesString = function () {
- return `I am a ${this.species}. ${this.toString()}`;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement