var numbers = [65, 44, 12, 4];
numbers.reduce((a,b) => {
return a + b
})
判断数据类型:
return Object.prototype.toString.call(ps).match(/\s+(\w+)/)[1]
var numbers = [65, 44, 12, 4];
numbers.reduce((a,b) => {
return a + b
})
判断数据类型:
return Object.prototype.toString.call(ps).match(/\s+(\w+)/)[1]
本文标题:js reduce
本文链接:https://www.haomeiwen.com/subject/uakjuctx.html
网友评论