Working with Arrays Flashcards

(12 cards)

1
Q

What are Arrays used for?

A

Arrays are used for grouping and ordering individual related items.

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

Can you assign an Array to a Variable?

A

Yes, you can assign an Array to a Variable.

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

What is each item in an Array known as?

A

Each item in an Array are known as Elements.

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

How are Arrays Declared?

A

Arrays are Declared Using Square Brackets.

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

Are the Elements in an Array comma-seperated?

A

Yes, Elements in an Array are Comma Seperated.

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

Can Elements be of any Data Type?

A

Yes, elements can be of any Data Type.

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

what is const smoothieIngredients = [‘apple’,’strawberry’,’pear’,’kiwi’]; an example of?

A

This code is an example of an Array.

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

Does the order in which we declare elements within an array matter?

A

Yes, the order of elements placed within an array matters.

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

Are Arrays Zero-Indexed?

A

Yes, Arrays are Zero Indexed.

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

How can we access the value of the element within an Array?

A

We can access it using it’s index position contained within the square brackets.

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

Do Arrays have a length.property?

A

Yes, arrays have a length.property.

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