Skip to content

Glossary: JavaScript Basics

Accumulator

The running result that `reduce` carries from one element to the next, such as the growing stock total in `products.reduce((sum, p) => sum + p.stock, 0)`.

Where the book teaches it

Related terms

reduce