© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Gelacio Azael Fernandez Aldava
web developer
Both answers are fine, also you can use array.reduce() and doesn’t need two operations(map & filter)