Working with objects and properties Flashcards
(2 cards)
1
Q
How can you update an objects properties
A
Using dot notation or bracket notation.
car.color = ‘blue’
car[‘color’] = ‘blue’
2
Q
How can you delete properties of an object
A
use the delete keyword.
e.g. delete foo.bar