Object Methods Flashcards

1
Q

Object.assign()

A

Copies the values of all enumerable own properties from one or more source objects to a target object.

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

Object.create()

A

Creates a new object with the specified prototype object and properties.

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

Object.defineProperty()

A

Adds the named property described by a given descriptor to an object.

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

Object.defineProperties()

A

Adds the named properties described by the given descriptors to an object.

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

Object.entries()

A

Returns an array containing all of the [key, value] pairs of a given object’s own enumerable string properties.

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

Object.freeze()

A

Freezes an object. Other code cannot delete or change its properties.

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

Object.fromEntries()

A

Returns a new object from an iterable of [key, value] pairs. (This is the reverse of Object.entries).

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

Object.getOwnPropertyDescriptor()

A

Returns a property descriptor for a named property on an object.

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

Object.getOwnPropertyDescriptors()

A

Returns an object containing all own property descriptors for an object.

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

Object.getOwnPropertyNames()

A

Returns an array containing the names of all of the given object’s own enumerable and non-enumerable properties.

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

Object.getOwnPropertySymbols()

A

Returns an array of all symbol properties found directly upon a given object.

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

Object.getPrototypeOf()

A

Returns the prototype of the specified object.

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

Object.is()

A

Compares if two values are the same value. Equates all NaN values (which differs from both Abstract Equality Comparison and Strict Equality Comparison).

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

Object.isExtensible()

A

Determines if extending of an object is allowed.

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

Object.isFrozen()

A

Determines if an object was frozen.

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

Object.isSealed()

A

Determines if an object is sealed.

17
Q

Object.keys()

A

Returns an array containing the names of all of the given object’s own enumerable string properties.

18
Q

Object.preventExtensions()

A

Prevents any extensions of an object.

19
Q

Object.seal()

A

Prevents other code from deleting properties of an object.

20
Q

Object.setPrototypeOf()

A

Sets the object’s prototype (its internal [[Prototype]] property).

21
Q

Object.values()

A

Returns an array containing the values that correspond to all of a given object’s own enumerable string properties.