javascript-objects Flashcards
1
Q
What are objects used for?
A
Model real-life objects, Storing multi-data-typed properties and their values
2
Q
What are object properties?
A
The keyword being assigned a value in an object.
3
Q
Describe object literal notation.
A
They are declared by a variable and assigned an opening and closing braces. All methods and properties go in between the curly braces and are separated by a comma
4
Q
How do you remove a property from an object?
A
The ‘delete’ property followed by the object name, the dot notation and property name
5
Q
What are the two ways to get or update the value of a property? Dot or square bracket notation
A
Dot or square bracket notation