MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / Dog

Class Dog

public/code/javascript/05_classes.js:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11class Dog extends Animal {
12 constructor(name, breed) {
13 super(name);
14 this.breed = breed;
15 }
16
17 speak() {
18 console.log(`${this.name} barks!`);
19 }
20}
21
22const dog = new Dog("Rex", "Shepherd");
23dog.speak();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected