JS 数组相加的几种方式js数组求和的方法vararray = [1,2,3,4,5] varsum =01.for循环for(leti =0i <array.lengthi++) { sum += ar2023-02-28JavaScript140