const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
let result = arr.reduce((a,b,index,arr) => {
  
  if (index >= 3) arr.splice(0);
  
  return a + b
  
})

console.log(arr) // []
console.log(result) // 10

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.