user
Write code to sum the given array elements.

Now complete the following instance -
Input: [1, 2, 3, 4, 5]
Output:
assistant
let arr = [1, 2, 3, 4, 5];
let sum = 0;

for (let i=0; i < arr.length; i++){
    sum += arr[i];
}

console.log(sum); // 15