I am trying to learn JS Prototype concept. I think I almost got it, but I was hoping that someone can verify my understanding for me (based on the picture attached).
function Car(){}
function drive(){
console.log("drive");
}
function stop(){
console.log("stop");
}
function park(){
console.log("park");
}
Car.prototype.drive = drive;
Car.prototype.stop = stop;
Car.prototype.park = park;
const myCar = new Car();
myCar.drive();
myCar.stop();
myCar.park();
console.log(Car.prototype); //{ drive: [Function: drive], stop: [Function: stop], park: [Function: park] }
console.log(Car.__proto__ === Function.prototype); // T as expected
console.log(Car.__proto__ === Function.__proto__); // T as expected
console.log(Function.prototype === Function.__proto__); // T as expected
console.log(Car.__proto__.__proto__ === Function.__proto__); //F
console.log(Car.prototype.__proto__); //null as expected
console.log(Car.prototype.drive.prototype.__proto__); //null as expected