标签:blog io java strong ar for art div cti
$scope.totalPrice = function () { return $scope.addcartProduct.reduce(function (money, product) { return money += (product.quantity * product.priceAfter); }, 0); }
这 reduce 和 forEach 很类似。不错!不用开变量
标签:blog io java strong ar for art div cti
原文地址:http://www.cnblogs.com/stooges/p/3952379.html