JS Objects Flashcards

1
Q

What are the two ways to get or update the value of a property?

A

Dot notation or square brackets

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

How do you remove a property from an object?

A

Use delete operator.

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

What are objects used for?

A

To group and store a set of data (variables and/or functions).
Simply: “It’s a box to keep related stuff together.”

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

What are object properties?

A

Another way to store data that is exclusive to the object.

Object properties tell us about the object.

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

Describe object literal notation.

A

Object literal notation is curly braces { } . Within the curly braces, properties and/or methods are nested inside. Each are separated by a comma.

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