The Life Of Objects Flashcards

1
Q

You can call a function, passing a specific ‘this’, using this method

A

call()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the difference between arrow functions and function declarations w.r.t. ‘this’

A

When the arrow function notation is used, it does not create its own ‘this’, and can see the outer scope’s ‘this’ instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Another object that is used as a fallback source of properties

A

Prototype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Function that allows you to instantiate objects using a specific prototype

A

create()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Prototypes are useful for defining properties of which all instances of a class [..], such as methods

A

Share the same value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Properties that differ for each instance cannot be stored in the [..]

A

Prototype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Add this keyword before a function to treat it as a constructor

A

New

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The prototype object used when calling a constructor function is the value bound to the prototype [..] of the function

A

Property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A plain, empty prototype derived from Object.prototype - this is the default [..] of all functions

A

Prototype property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The prototype property is the way an object is [..] with a constructor

A

Associated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Way of finding an object’s prototype

A

Object#getPrototypeOf()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The prototype is like the [..] from which objects are created

A

Blueprint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Currently, class declaration allow [..] to be added to the prototype

A

Only methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Using a [..] as a map is dangerous (due to inherited properties from Object.prototype)

A

Plain object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Create an object without a prototype using this method call

A

Object.create(null)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Work-around for using a plain object as a map (ignoring prototype’s properties)

A

Object#hasOwnProperty()

17
Q

Include symbol properties in object and class declarations by putting [..] around the property name

A

Square brackets