Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function savings(input) {
- let salary = Number(input[0]);
- let months = Number(input[1]);
- let minimalCosts = Number(input[2]);
- let monthlySavings = salary * 0.70 - minimalCosts;
- console.log(`She can save ${(monthlySavings / salary * 100).toFixed(2)}%\n${(monthlySavings * months).toFixed(2)}`);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement