JavaScript Object Methods Flashcards

1
Q

Object.keys(obj)

A

Returns an array containing the names of all properties of an object.

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

Object.values(obj)

A

Returns an array containing the keys

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

Object.hasOwnProperty(prop)

A

Returns a boolean based on the prop

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

Object.entries(obj)

A

Returns an array of arrays where each inner array has the key and value pair

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

Delete object.property

A

Delete a key,value pair

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