const array1 = [1, 2, 3, 4]; const reducer = (accumulator, currentValue) => accumulator + currentValue; alert(!(array1.reduce(reducer) % 10));