Hello everyone, I've been seeing this line of code a lot lately or something similar to it's nature.

Code:
Car.prototype = new Vehicle(true, true);
Car.prototype.constructor = Car;
What does the last line mean? I can delete this line out and it doesn't seem to change the code in any way. Do you have any practical examples why I should always set an object.prototype.constructor = object? What do I miss? What can't I access if I don't type this line?

Even if I comment out this line, I get what I want which is that Car inherits the properties of Vehicle, and audi variable gets access to both "classes".

Here's the rest if you want to know.

Code:
    function Vehicle(hasEngine, hasWheels) {
    this.hasEngine = hasEngine || false;
    this.hasWheels = hasWheels || false;
}

Vehicle.prototype.power = function () {  
   console.log("RESCUE");  
}  
 
 function Car (make, model, hp) {
    this.hp = hp;
    this.make = make;
    this.model = model;
}

Car.prototype = new Vehicle(true, true);
//Car.prototype.constructor = Car;
Car.prototype.displaySpecs = function () {
    console.log(this.make + ", " + this.model + ", " + this.hp + ", " + this.hasEngine + ", " + this.hasWheels);
}
var audi = new Car ("Audi", "A4", 150);

audi.displaySpecs();
// logs: Audi, A4, 150, true, true
Thanks!