Refer to the following code:
class Vehicle{
constructor(plate){
this.plate = plate;
}
}
class Truck extends Vehicle{
constructor(plate, weight){
//Missing code
this.weight = weight;
}
displayWeight(){
console.log(`The truck ${this.plate} has a weight of ${this.weight}lb.`);
}
}let myTruck = new Truck('123Ab',5000);
myTruck.displayWeight();
Which statement should be added to missing code for the code to display 'The truck 123AB has a
weight of 5000lb.
Tawna
8 months agoLashaunda
8 months agoJaclyn
7 months agoCarylon
7 months agoTonja
8 months agoLeonora
7 months agoJunita
8 months agoDell
8 months agoShad
7 months agoKrystal
7 months agoKirk
8 months agoBlossom
8 months agoAlberto
8 months agoAngelo
9 months agoCurt
7 months agoCurt
7 months agoPamella
8 months agoMacy
8 months agoVictor
8 months agoEthan
8 months agoRueben
8 months ago