An open API service indexing awesome lists of open source software.

https://github.com/imelgrat/array-reduce-example

Array.reduce() example
https://github.com/imelgrat/array-reduce-example

array-manipulations array-methods arrays javascript reduce reducer

Last synced: 3 months ago
JSON representation

Array.reduce() example

Awesome Lists containing this project

README

          

# Array.reduce() example

Unlike most Array iteration methods, which return an array of values, the **.reduce()** method will reduce an array to a single value. In this example, the method will return the longest item in the array.

Read more at: https://imelgrat.me/javascript/array-object-iteration-javascript/