var arr = [1, 2, 3, 'a', 'b', 'c', '4', '5', '6'], sum = arr.reduce((sum, el) => sum+(el=+el?+el:0)); alert(sum);