VYThere's an error in example 2 for rewriting map function, it should be: const squaresOfNumbers = numArray => numArray.reduce(ReplyยทArticleยทMar 22, 2017ยทJavaScript Patterns โ Wrangling arrays like a boss, with Array#reduce ๐