List of questions
Related questions
Question 202 - Certified JavaScript Developer I discussion
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} is making a sound.`)
}}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}}l
et myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?
A.
Puppy is barking
Your answer:
0 comments
Sorted by
Leave a comment first