You want to convert all elements in an array to some other form.
For example, you have
theUsers = [
{id: 1, username: 'john'}
{id: 2, username: 'lexy'}
{id: 3, username: 'pete'}
]
and you want to have an array of usernames only, i.e.
['john', 'lexy', 'pete']
Method 1 - using .map
...