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