Make the specific dog bark

Report a typo

The shelter has a new dog named Vesper. Modify the static method bark() so that it returns the name of the animal, that is, "Vesper" and its sound, "Woof!".

Sample Input 1:

Sample Output 1:

Vesper: Woof!
Write a program in JavaScript
class Animal {
constructor() {
}
}
class Dog extends Animal {
constructor(name) {
super();
this.name = name;
}
// your code here

}

const vesper = new Dog('Vesper');
___

Create a free account to access the full topic