[1,2,3,4,5].reduce((acc, item) => item, 0) code example Example: syntax of reduce in js [1,2,3,4,5].reduce((acc, current)=>acc+current, 0)