Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let totalAKHP;
- let totalPresc;
- if(data.akhp) {
- totalAKHP = data.akhp.reduce(prev, curr => prev + curr.totalFee, 0);
- }
- if(data.prescription) {
- totalPresc = data.prescription.reduce(prev, curr => prev + curr.totalFee, 0);
- }
- const total = totalAKHP + totalPresc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement