Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function volleyball(input) {
- let year = input.shift();
- let holidays = Number(input.shift());
- let weekendsInHomeTown = Number(input.shift());
- let weeekendsInSofia = 0;
- let gameDays = 0;
- let totalGameDays = 0;
- weeekendsInSofia = 48 - weekendsInHomeTown;
- gameDays = weeekendsInSofia * (3.0 / 4);
- holidays = holidays * (2.0 / 3);
- totalGameDays = gameDays + holidays + weekendsInHomeTown;
- if (year == "leap") {
- totalGameDays = totalGameDays + (totalGameDays * 0.15);
- }
- console.log(Math.floor(totalGameDays));
- }
- volleyball(["normal", 60, 0]);
Advertisement
Add Comment
Please, Sign In to add comment