ARRAYS Flashcards

1
Q

What is an Array?

A

Arrays are JavaScript’s way of making lists. Arrays can store any data types (including strings, numbers, and booleans). Like lists, arrays are ordered, meaning each item has a numbered position.

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

How to create an Array ?

A

Is to use an array literal. An array literal creates an array by wrapping items in square brackets [].
Remember, arrays can store any data type — we can have an array that holds all the same data types or an array that holds different data types.

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

How is called the content item in an array ?

A

Each content item inside an array is called an element.

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

What is the keyword for position of each item in an array?

A

An index

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

How to access one fo the item of an array ?

A

We can access one item in an array using its index, with syntax like: myArray[0].

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

What do the method .pop() ?

A

Remove items from an array

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

What do the method .push()?

A

Add a items to an array

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