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