What value is obtained when the following code is executed?
const arr = [1, 2, 3, 4];
const result = arr.reduce((acc, val) => acc + val, 0);
console.log(result);
What value is obtained when the following code is executed?
const arr = [1, 2, 3, 4];
const result = arr.reduce((acc, val) => acc + val, 0);
console.log(result);