Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person {
- constructor(name) {
- this.name = name;
- }
- }
- class GreatPerson extends Person {
- constructor(name, phrase) {
- super(name);
- this.phrase = phrase;
- }
- }
- class FuckingGreatPerson extends GreatPerson {
- constructor(name, phrase) {
- super(name, phrase);
- this.say();
- }
- say () {
- alert(this.name + ' says ' + this.phrase);
- }
- }
- let kek = new FuckingGreatPerson('kek', 'lol');
Add Comment
Please, Sign In to add comment