javascript-objects Flashcards
What are objects used for?
Objects are used for representing things, storing properties, and storing methods.
What are object properties?
Object properties are variables that only exist in the scope of the object.
Describe object literal notation.
Object literal notation is the creation of an object without using the new Object() phrase. It involves curly braces with or without content being assigned to a variable.
How do you remove a property from an object?
To remove a property from an object the keyword delete is used followed by the object variable name, the member operator (.), then the property name. This process works for substituting methods for properties.
What are the two ways to get or update the value of a property?
Two ways to update or get the value of a property is the dot notation or the bracket notation. The bracket notation cannot call methods, so typically the dot notation is preferred.