Hacker News new | ask | show | jobs
by hn_throwaway_99 2569 days ago
Use the right tool for the job. Array to potentially different sized array? Use flatMap (which he implements in his example, albeit not it an optimal way). Array to single object or value? Use reduce.