ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 202 - Certified JavaScript Developer I discussion

Report
Export

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
Answers
A.
Puppy is barking
Suggested answer: A
asked 23/09/2024
Sergio Pena Ochoa
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first