Docusign Interview Question

Implement the reduce function for a js array.