Javascript Objects Flashcards

(10 cards)

1
Q

What is an object in JavaScript?

A

A collection of properties.

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

What is a property inside an object?

A

A name (or key) associated with a value.

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

Literal objects in JavaScript can be compared to:

A

Real-life objects

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

Which of the following is used to declare an object?

A

const or let

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

What symbols are used to define the properties inside an object?

A

Curly brackets {}

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

What does the dot notation allow us to do?

A

Access object properties

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

Which notation can also be used to access an object’s property?

A

Square brackets []

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

Which command removes a property from an object?

A

delete object.property

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

Objects in JavaScript can store arrays and other objects. (true or false)

A

True

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

Objects in JavaScript are considered a main data type. (true or false)

A

True

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