The map function simply transforms one array into another array. For example, suppose you have an array of person objects but what you really need is an array of names (strings)
The map function will convert the array of person objects into an array of names (strings).
Lets say this is the array you start with:
const friends = [