zepto - reduce

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reducespa

 

var ss = [0, 1, 2, 3, 4].reduce(function (previousValue, currentValue, index, array) {
        return previousValue + currentValue;
    });
    console.log(ss);
相關文章
相關標籤/搜索