JS Objects Flashcards
1
Q
What are the two ways to get or update the value of a property?
A
Dot notation or square brackets
2
Q
How do you remove a property from an object?
A
Use delete operator.
3
Q
What are objects used for?
A
To group and store a set of data (variables and/or functions).
Simply: “It’s a box to keep related stuff together.”
4
Q
What are object properties?
A
Another way to store data that is exclusive to the object.
Object properties tell us about the object.
5
Q
Describe object literal notation.
A
Object literal notation is curly braces { } . Within the curly braces, properties and/or methods are nested inside. Each are separated by a comma.