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