Array Map Flashcards

1
Q

What does Array.map do?

A

method creates a new array populated with the results of calling a provided function on every element in the calling array.

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

What should the callback function return?

A

Its return value is added as a single element in the new array.

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

What is Array.map useful for?

A

changing every portion of the array also if an if statement is added very specific part of each array

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