JavaScript Objects Flashcards
1
Q
What are objects used for?
A
Act as a collection of variables and functions under one identifier
2
Q
What are object properties?
A
basically variables renamed
3
Q
Describe object literal notation.
A
typically stored in a variable, you have the identifier and the start of the object literal with the opening curly brace. Inside you have keys and their value. Keys being either variables as properties and their value or functions as methods and its value.
4
Q
How do you remove a property from an object?
A
using the delete operator
5
Q
What are the two ways to get or update the value of a property?
A
using dot notation or square brackets notation and assigning a value to that property