DCWhy not just use concat instead of push ? make its nice and compact and easy to follow along: const squaresOfNumbers = numArray => numArray.reduce((acc, item) => acc.concat(item * item), [])Reply·Article·Mar 16, 2017·1·JavaScript Patterns — Wrangling arrays like a boss, with Array#reduce 👊