Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var base = function(){
- this.type = 1
- }
- base.prototype.print = function(s){
- console.info(s)
- return s
- }
- var sub = function(){
- this.type = 2
- }
- // var subPrototype = sub.prototype = new base()
- Object.assign(sub.prototype,base.prototype)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement