Introduction to JavaScript Higher Order Functions: Reduce
Difficulty: Advanced
Duration: 5 minutes and 27 seconds
Students: 160
Rating: 5/5
This practical lesson explores the JavaScript Higher Order Function - Reduce. A higher order function is a function that takes another function as an argument or returns a function. The purpose of the reduce function is to take an array and reduce it to a singular value.
Learning Objectives
- Learn how reduce works
- Learn about the reducer function, which is the first argument of reduce
- Learn about the structure of the reducer and how it iterates through the array argument
- Learn about the optional initial value which may change the result of the reduce function
Intended Audience
This lesson is intended for anyone who wants to learn about JavaScript Higher Order Functions: Reduce.
Prerequisites
Introduction to JavaScript Higher Order Functions: Map & Filter
This lesson does include the use of template string expressions as part of its demonstration. If you are not familiar with this subject, the following lesson is recommended:
Introduction to JavaScript Template Literals
Covered Topics