let sum = 0; let data = [1, 2, 3, 4, 5]; for (let element of data) { sum += element; } console.log(sum);