JavaScript does allow us to create new objects with access to the same properties and methods (without creating new copies of those properties and methods each time) through something called the prototype chain. The last object in your chain will inherit properties and methods from every previous object in the prototype chain.
Objects - store functions with their associated data. (Encapsulation)
Dot Notation
Object.create
Object.create()
method creates a new object, using an existing object as the prototype of the newly created object.
Object.create(proto)
====
The new keyword automates three things:
Functions are both objects and functions.
The class object has key: prototype, which is an object full of methods accessible to all instances of that object.
The “New” keyword creates an object that inherits all the prototype properties.
We refer to this specific object as “This”, and we refer to its inherited prototype properties with the key: __ proto __
this.proto = classObject.prototype
proto is a hidden bond to the original class Object’s properties
===
The new keyword:
If you call “this” without “new” in the global context, it refers to the window object.
Uppercase the first letter of functions that should be run with new () keyword.