Private Properties and Methods
Using var or let or const you can create private properties and methods.
Ex: –
this.price
var price
let price
Prototype
Every object has an internal prototype that gives it its structure. This internal prototype is a reference to an object describing the code and data that all objects of that same type will have in common.
Prototype Object
Every object is associated with another Object in JavaScript
Prototype Object
Every object is associated with another object in JavaScript.
Note – Prototype Object of Object.prototype is null
Prototype Object
Every object is associated with another object in JavaScript.
Note – Prototype Object of Object.prototype is null
Prototype Object
Every object is associated with another object in JavaScript.
Note – Prototype Object of Array.prototype is Object.prototype and
Prototype Object of Object.prototype is null