Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function total(arrayToSum) {
- if(arrayToSum){
- return arrayToSum.reduce(prev, now => prev + now.totalFee, 0);
- }
- return 0;
- }
- // di render
- const totalHarga = total(data.akhp) + total(data.prescription);
- // nanti tinggal pake
- currencyFormatter(totalHarga);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement