Guest User

Untitled

a guest
Feb 25th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. class Person {
  2. constructor(name) {
  3. this.name = name;
  4. }
  5. }
  6.  
  7. class GreatPerson extends Person {
  8. constructor(name, phrase) {
  9. super(name);
  10. this.phrase = phrase;
  11. }
  12. }
  13.  
  14. class FuckingGreatPerson extends GreatPerson {
  15. constructor(name, phrase) {
  16. super(name, phrase);
  17. this.say();
  18. }
  19. say () {
  20. alert(this.name + ' says ' + this.phrase);
  21. }
  22. }
  23.  
  24. let kek = new FuckingGreatPerson('kek', 'lol');
Add Comment
Please, Sign In to add comment