There are a lot of dogs in the animal shelter. This new child class Dog extends the Animal class. Create only the method that would bark to the console without creating a new instance. Everything else is taken care of internally.
Static methods and properties
Can the dogs bark?
Report a typo
Sample Input 1:
Sample Output 1:
Woof!Write a program in JavaScript
class Animal {
constructor() {
}
}
class Dog extends Animal {
constructor() {
super();
}
// your code here
}
___
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.