Hi experts here is my code and I'm stuck how this keyword is adding property to a object.
function carMaker(){
this.companyName='Lamborghini';
}
let LamborghiniUrus = new carMaker();
carMaker.prototype.country="Italy"
LamborghiniUrus.price="200000";
I know property added with this and Object.prototype is inherited to all objects but does both are equivalent i.e, this is also adding property to prototype?
If yes then why console.log(carMaker.prototype.companyName) is undefined.
If no then how we can access a property added with thisin the same object(in carMake fuction in my case).
And also does this.companyName='Lamborghini' and LamborghiniUrus.price="200000" are equivalent.