Implement a Safe reduce Polyfill Helper for Arrays — Easy JavaScript/TypeScript Practice Problem