Javascript-objects Flashcards
1
Q
What are objects used for?
A
Objects group together a set of variables and functions to create a model
of a something you would recognize from the real world.
2
Q
What are object properties?
A
If a variable is part of an object, it is called a
property. Properties te ll us about the object, such as
the name of a hotel or the number of rooms it has.
3
Q
Describe object literal notation.
A
var name = {
property: value,
property: value
};
4
Q
How do you remove a property from an object?
A
delete operator
5
Q
What are the two ways to get or update the value of a property?
A
dot notation, bracket notation