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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you delete properties of an object

A

use the delete keyword.

e.g. delete foo.bar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly