The Life Of Objects Flashcards
You can call a function, passing a specific ‘this’, using this method
call()
Explain the difference between arrow functions and function declarations w.r.t. ‘this’
When the arrow function notation is used, it does not create its own ‘this’, and can see the outer scope’s ‘this’ instead.
Another object that is used as a fallback source of properties
Prototype
Function that allows you to instantiate objects using a specific prototype
create()
Prototypes are useful for defining properties of which all instances of a class [..], such as methods
Share the same value
Properties that differ for each instance cannot be stored in the [..]
Prototype
Add this keyword before a function to treat it as a constructor
New
The prototype object used when calling a constructor function is the value bound to the prototype [..] of the function
Property
A plain, empty prototype derived from Object.prototype - this is the default [..] of all functions
Prototype property
The prototype property is the way an object is [..] with a constructor
Associated
Way of finding an object’s prototype
Object#getPrototypeOf()
The prototype is like the [..] from which objects are created
Blueprint
Currently, class declaration allow [..] to be added to the prototype
Only methods
Using a [..] as a map is dangerous (due to inherited properties from Object.prototype)
Plain object
Create an object without a prototype using this method call
Object.create(null)