filter(select) + map
const ids = this.visits.filter(visit => visit.bulk_action_flag).map(visit => visit.id)
map + reduce
reduceで配列の総和を計算。return visit.items.map(item => item.purchase_unit * item.count).reduce(function(prev, current) { return prev + current; }, 0);
0 件のコメント:
コメントを投稿