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.
Truman
7 months agoAnnabelle
7 months agoHalina
7 months agoYan
7 months agoDorsey
8 months agoLoren
7 months agoAnnamae
7 months agoSimona
7 months agoTiera
7 months agoLera
7 months agoTiera
7 months agoLavonda
7 months agoRasheeda
7 months agoAvery
7 months agoErick
8 months agoShoshana
8 months agoDean
8 months agoLarae
8 months agoLarae
8 months agoJeanice
8 months agoBrock
8 months agoCortney
7 months agoLatosha
8 months agoErick
9 months agoShoshana
9 months agoIlene
9 months agoReita
9 months agoBernardo
10 months agoEzekiel
10 months agoRolland
10 months agoBeckie
10 months agoAracelis
8 months agoNorah
8 months agoIrene
8 months ago