Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function christmasPreparation(input) {
- let rollPrice = Number(input[0]) * 5.8;
- let clothPrice = Number(input[1]) * 7.2;
- let gluePrice = Number(input[2]) * 1.2;
- let percentDiscount = Number(input[3]);
- let sum = rollPrice + clothPrice + gluePrice;
- console.log((sum - (sum / 100 * percentDiscount)).toFixed(3));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement