DEV Community

loading...

. Remembering .reduce() arguments ?

johnmilner33 profile image John Milner ・1 min read

Has anyone come up with an acronym to remember all of the arguments for the .reduce() array prototype method in JavaScript ?

Discussion (2)

pic
Editor guide
Collapse
vonheikemen profile image
Heiker

A.V.K.? Accumulator, Value, Key.

Maybe you can think of avocados when you're trying to remember.

Collapse
johnmilner33 profile image
John Milner Author

Cool. Nice one, thank you for your reply🤓🤓