使用 reduce 求和

千锋教育

arr = [1,2,3,4,5,6,7,8,9,10],求和


arr = [1,2,3,[[4,5],6],7,8,9],求和



arr = [{a:1, b:3}, {a:2, b:3, c:4}, {a:3}],求和