Creates a new array by applying a function to every element in the original array.
What is map?
This term refers to writing code that does not change the original data.
What is immutability?
This compact syntax for writing functions was introduced in ES6 and does not bind its own `this`.
What is an arrow function?
Currying transforms a function that takes multiple arguments into this.
What is a sequence of functions that each take one argument?
The reduce() method takes this kind of function and applies it to each element in an array.
What is a reducer function?
Executes a provided function once for each array element but does not return anything
What is forEach?
This type of function always produces the same output for the same input.
What is a pure function?
A function that is passed into another function as an argument.
What is a callback function?
This JavaScript property tells you how many parameters a function is defined to accept.
What is fn.length?
You can use reduce to sum all numbers in an array by using this type of initial value.
What is 0 (zero)?
Returns a portion of an array without modifying the original. It takes a start and an optional end index.
What is slice?
These types of functions can be passed as arguments, returned from other functions, and assigned to variables.
What are first-class functions?
This feature allows an inner function to “remember” and access variables from its outer function.
What is a closure?
If a curried function is called with fewer arguments than needed, it returns this.
What is another function that takes the remaining arguments?
If no initial value is provided to reduce(), it uses this as the starting value for the accumulator.
What is the first element of the array?
Creates a new array with only the elements that pass a test implemented by the provided function.
What is filter?
This term describes functions that either take other functions as arguments or return them as results.
What are higher-order functions?
This is the number of parameters a function is declared to accept.
What is arity?
In a curry helper, this is the step that repeatedly returns a new function.
What is the recursive step?
This metaphor typically describes how reduce transforms an array into a single value.
What is folding?
Can return any data type as a single result by accumulating values through a callback function.
What is reduce?
This term refers to anything a function does besides returning a value, such as modifying external variables or logging to the console.
What are side effects?
Transforming a function with multiple arguments into a sequence of functions that each take one argument.
What is currying?
This concept describes when you pre-fill some arguments of a function.
What is partial application?
Using reduce this way allows you to transform a nested array [[1,2],[3,4]] into [1,2,3,4] in one go.
What is flattening?