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.
2
Q
What should the callback function return?
A
Its return value is added as a single element in the new array.
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