Objects Flashcards
1
Q
What are objects used for?
A
Objects group together a set of variables and functions to create a model.
2
Q
What are object properties?
A
A variable that is part of an object.
3
Q
Describe object literal notation.
A
An array of key:value pairs, with a colon separating the keys and values, and a comma after every key:value pair, except for the last. ( var object = {};)
4
Q
How do you remove a property from an object?
A
The delete operator.
5
Q
What are the two ways to get or update the value of a property?
A
Reassigning the value to the same key using either dot notation or square brackets.