We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3081486 commit 75e8e8cCopy full SHA for 75e8e8c
04_quicksort/ES6/01_loop_sum_reduce_version.js
@@ -3,6 +3,6 @@
3
* @param {Array} array Array of numbers
4
* @returns {number} Sum of the numbers
5
*/
6
-const sumReduce = array => array.reduce((curr, prev) => curr + prev);
+const sumReduce = array => array.reduce((prev, curr) => prev + curr);
7
8
console.log(sumReduce([1, 2, 3, 4])); // 10
0 commit comments