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

Method constructor

public/code/javascript/05_classes.js:12–15  ·  view source on GitHub ↗
(name, breed)

Source from the content-addressed store, hash-verified

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!`);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected