How to group arrays in JavaScript without reduce() | Hacker News Reader