Array Methods Flashcards

1
Q

Concat()

A

Combines existing arrays and creates a new one

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

Constructor()

A

Returns the function that created the array prototype

displays pseudocode

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

copyWithin()

A

copies array elements to another position in the array,
method overwrites the existing values,
does not add items to the array.

(doubles elements in the array)

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

entries()

A

The entries() method returns an Array Iterator object with key/value pairs:

[0, “Banana”]
[1, “Orange”]
[2, “Apple”]
[3, “Mango”]

The entries() method does not change the original array.

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

every()

A

executes a function for each array element.

returns a Boolean

does not change the original array

(checks to see if every methods meets the given parameters)

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

fill()

A

Replaces values in the array with given parameters

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

filter()

A

creates a new array filled with elements that pass a test provided by a function.

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

find()

A

Returns the value of the first element that meets the given parameters

executes for each element in the array

returns undefines if nothing meets the given parameters

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

findIndex()

A

returns the z-index of the array element that meets the requirement

executes for each element in the array

returns -1 if nothing meets the given parameters

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

forEach

A

calls a function for each element in an array

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