Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person {
- constructor(name) {
- this.name = name;
- }
- }
- class PolitePerson extends Person {
- constructor(name) {
- this.greetColleagues(); // 🔴 This is disallowed, read below why
- super(name);
- }
- greetColleagues() {
- alert('Good morning folks!');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement