Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function catWalk([arg1, arg2, arg3]) {
- let walkTime = Number(arg1);
- let walkCount = Number(arg2);
- let caloriesIntake = Number(arg3);
- let dailyCaloriesBurned = walkTime*walkCount*5;
- if (dailyCaloriesBurned >= caloriesIntake/2) {
- console.log(`Yes, the walk for your cat is enough. Burned calories per day: ${dailyCaloriesBurned}.`);
- } else {
- console.log(`No, the walk for your cat is not enough. Burned calories per day: ${dailyCaloriesBurned}.`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment