怎么用JS数组计算奇数和偶数的和var arr = [1,3,4,5,6,7]function sum(arr){var evenSum = 0,oddSum = 0for(var i=0i<arr.lengthi++){if(arr[i] % 2){oddS2023-03-05JavaScript170