console.log( [1,2,3].reduce(function(acc, val) { return acc + val; }) ) console.log( [].reduce(function(acc, val) { return acc + val; }, 0) ) Run code snippetHide results