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!".
Static methods and properties
Make the specific dog bark
Report a typo
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');
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.