Skip to content
loading...

re: Array Methods Used on an Array of Objects VIEW POST

FULL DISCUSSION
 

Another cool thing you could do to expand on this would be to break the function out into something reusable like this:

const isOfAge = person => person.age >= 21

guestlist.some(isOfAge)
guestlist.filter(isOfAge)

That way the code becomes more resusable and more readable.

Cheers!

 
code of conduct - report abuse