9 months ago
9 lines276 B
const orders = [12.5, 80, 7.25, 43]; | |
| |
const big = orders.filter(total => total > 20); | |
const withTax = big.map(total => total * 1.19); | |
const sum = withTax.reduce((a, b) => a + b, 0); | |
| |
console.log(sum.toFixed(2)); // "146.37" | |
| |
// Try changing the values above and run it again. |