DEV Community

Discussion on: Intro to the map function

Collapse
 
jwalzak profile image
Jason Walzak

Shouldn't it be person.hobbies[0]?

Map is really cool though. This is really helping with my understanding.

Collapse
 
jreina profile image
Johnny Reina

It depends on what you are after. In the given example, I wanted to pull out the second item in the hobbies array from each person.

I'm glad I could help. When I first bumped into map it freaked me out quite a bit.