Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. var base = function(){
  2. this.type = 1
  3. }
  4. base.prototype.print = function(s){
  5. console.info(s)
  6. return s
  7. }
  8.  
  9. var sub = function(){
  10. this.type = 2
  11. }
  12. // var subPrototype = sub.prototype = new base()
  13. Object.assign(sub.prototype,base.prototype)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement