Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reduce parameters

The reduce method in JavaScript takes four parameters:
1. Accumulator
2. Current Value
3. Current Index
4. Source Array

### Example
reduce((accumulator, currentValue, index, array) => { ... }, initialValue)
 
PREVIOUS NEXT
Tagged: #reduce #parameters
ADD COMMENT
Topic
Name
4+7 =