What is the purpose of the `reduce()` function for arrays? | Array Operations | javascript Interview Questions | NextRound.in