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
5 months agoLashaunda
5 months agoJaclyn
5 months agoCarylon
5 months agoTonja
6 months agoLeonora
5 months agoJunita
5 months agoDell
6 months agoShad
5 months agoKrystal
5 months agoKirk
5 months agoBlossom
6 months agoAlberto
6 months agoAngelo
6 months agoCurt
5 months agoCurt
5 months agoPamella
5 months agoMacy
5 months agoVictor
6 months agoEthan
6 months agoRueben
6 months ago