Array Methods Flashcards

1
Q

ForEach

A

Executes callback for each element in array

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

map()

A

Creates and returns a new array based off callback

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

filter()

A

Returns a new array with whatever elements pass the filter criteria set in the callback function

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

includes()

A

Returns true or false if search parameter exists in array

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

find()

A

Returns the first element in array that passes the callback testing function

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

fill()

A

Mutates an array putting a value at a certain index based on a range

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