题解 | #数组求和#
数组求和
http://www.nowcoder.com/practice/cc3ce199461c4c4cb8f63db61d7eba30
{
"css":"",
"js":"
function sum(arr) {
return arr.reduce((arr,v)=>{
arr+=Number(v);return arr
},0)
}
",
"html":"","libs":[]
}
数组求和
http://www.nowcoder.com/practice/cc3ce199461c4c4cb8f63db61d7eba30
{
"css":"",
"js":"
function sum(arr) {
return arr.reduce((arr,v)=>{
arr+=Number(v);return arr
},0)
}
",
"html":"","libs":[]
}
相关推荐