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 ๐