Docusign interview question

Implement the reduce function for a js array.