forEach(一排人,每个人都捐点)
developers.forEach(function (developer) {
developer.donate();
});
map(一排人,每个人脱鞋放正前方,得到一排鞋)
developers.map(function (developer) {
return developer.shoes;
})
reduce(一排鞋,把所有鞋子放进一个盒子,数数总价多少)
var totalShoesPrice = shoeses.reduce(function (countedPrice, shoes) {
return countedPrice + shoes.price;
}, 0);
filter(一排鞋,是AJ的出列)
var AJshoeses= shoeses.filter(function (shoes) {
return shoes.price > "10000RMB";
});