Javascript- objects Flashcards
1
Q
What are objects used for?
A
group togther a set of variables & functions to create a model.
variables & functions take on a new name
2
Q
What are object properties?
A
variables = object properties
it tells us about the object
3
Q
Describe object literal notation
A
is the curly braces + their content, there is a colon for every key coma separate each property
4
Q
How do you remove a property from an object?
A
use delete operator
5
Q
What are the two ways to get or update the value of a property?
A
- dot notation= object.new property
2. bracket notation= object [‘new property’]