JavaScript Objects Flashcards

1
Q

What are objects used for?

A

Act as a collection of variables and functions under one identifier

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

What are object properties?

A

basically variables renamed

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

Describe object literal notation.

A

typically stored in a variable, you have the identifier and the start of the object literal with the opening curly brace. Inside you have keys and their value. Keys being either variables as properties and their value or functions as methods and its value.

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

How do you remove a property from an object?

A

using the delete operator

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

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

A

using dot notation or square brackets notation and assigning a value to that property

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