array-reduce Flashcards
1
Q
What is Array.prototype.reduce useful for?
A
often used for tasks such as summing up all the values in an array, counting the number of occurrences of elements in an array, or flattening an array of arrays.
Learning Fuze > array-reduce > Flashcards
What is Array.prototype.reduce useful for?
often used for tasks such as summing up all the values in an array, counting the number of occurrences of elements in an array, or flattening an array of arrays.