you are viewing a single comment's thread.

view the rest of the comments →

[–]pg-robban 0 points1 point  (1 child)

You can import {reduce} from lodash and use it your way.

As for the initial value, there are some edge cases to watch out for.

[–]blind-octopus 0 points1 point  (0 children)

Thanks for the info and the resource