JavaScript - 基本面函数 - 求出数组的和 判断结果是 "even" or "odd" function oddOrEven(arr) { return arr.reduce((a,b)=>a+b,0) % 2 ? 'odd' : 'even'; }