1
in an array of objects, console.log names of people whose age >= 21
ChristyCarpente (0)

solved! I just used filter :) thank you!

I am trying to get my code to return an array of only the names of those in the array (stored as objects within the array) who are over 21 (can drink).
I have managed to get it to return the whole object for each person who is over 21, but I ONLY want the names. Can anyone steer me in the right direction?

https://repl.it/@ChristyCarpente/dangArrayOfObjects

You are viewing a single comment. View All
1
ash15khng (218)

Well you solved it in result? Do you still need help?

1
ChristyCarpente (0)

@ash15khng no I do not! I couldn't find my post again to update it. Thank you :)