JavaScript Object Methods Flashcards
1
Q
Object.keys(obj)
A
Returns an array containing the names of all properties of an object.
2
Q
Object.values(obj)
A
Returns an array containing the keys
3
Q
Object.hasOwnProperty(prop)
A
Returns a boolean based on the prop
4
Q
Object.entries(obj)
A
Returns an array of arrays where each inner array has the key and value pair
5
Q
Delete object.property
A
Delete a key,value pair