'use strict';
window.onload = function () {
const arr = [10, 14, 35, 34, 12, 23, 5, 345];
let sum = 0;
const func = (currentValue) => {
sum += currentValue;
console.log(sum);
}
console.log(sum);
arr.forEach(func)
}