DEV Community

Discussion on: JavaScript: Array Tips and Tricks You Should Know

Collapse
 
chilupa profile image
Pavan Chilukuri • Edited

Nice article!
Number 3: Using .map is much easier and we can use object destructuring if you want to pull a specific value. 😄
This should give you the same result.

const friendsNames = friends.map(({name}) => name)
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jenueldev profile image
Jenuel Oras Ganawed

Yup its, 3 hehe 3 is just another solution for map.. But I will say, map is still powerful. 😁