MCPcopy Create free account
hub / github.com/PhilopaterHany/JavaScript-Bootcamp / User

Class User

Lessons/Week 19/153 - Class Inheritance.js:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6// Parent Class
7class User {
8 constructor(id, username) {
9 this.i = id;
10 this.u = username;
11 }
12 sayHello() {
13 return `Hello ${this.u}`;
14 }
15}
16
17// Derived Class
18class Admin extends User {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected