adding alements in an array successively with reduce javascript code example Example: reduce javascript let sum = arr.reduce((curr, index) => curr + index);