Last active
March 18, 2016 23:55
-
-
Save tkheyfets/e4f24f38e9cec9e5d4b3 to your computer and use it in GitHub Desktop.
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 extend(Child, Parent) { | |
Child.prototype = Object.create(Parent.prototype); | |
Child.prototype.constructor = Child; | |
return Child; | |
} | |
var Message = function (text) { | |
this.text = text; | |
}; | |
Message.prototype.send = function (to) { | |
//.. | |
}; | |
var Email = extend(function (text, from, to) { | |
//.. | |
}, Message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment