题解 | #数组求和#
数组求和
https://www.nowcoder.com/practice/cc3ce199461c4c4cb8f63db61d7eba30
function sum(arr) { let result = 0; for(var i =0;i<arr.length;i++){ result+=arr[i]; } return result; }
数组求和
https://www.nowcoder.com/practice/cc3ce199461c4c4cb8f63db61d7eba30
function sum(arr) { let result = 0; for(var i =0;i<arr.length;i++){ result+=arr[i]; } return result; }
相关推荐