Class Relationship: Vehicle and Car

Report a typo

class Car extends Vehicle {
  constructor(make, model, year) {
    super(make, model);
    this.year = year;
  }

  honk() {
    console.log(`The ${this.year} ${this.make} ${this.model} honks its horn.`);
  }
}

What is the primary task performed in the following code snippet?

Select one or more options from the list
___

Create a free account to access the full topic