Can the dogs bark?

Report a typo

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.

Sample Input 1:

Sample Output 1:

Woof!
Write a program in JavaScript
class Animal {
constructor() {
}
}
class Dog extends Animal {
constructor() {
super();
}
// your code here
}
___

Create a free account to access the full topic