Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SummerClotes(input){
- let gradus = Number(input.shift());
- let weather = input.shift();
- let outfit = 0;
- let shoes = 0;
- if(gradus >= 10 && gradus <= 18){
- switch(weather){
- case 'Morning': outfit = 'Sweatshirt';
- shoes = 'Sneakers';break;
- case "Afternoon": outfit = 'Shirt';
- shoes = 'Moccasins';break;
- case "Evening": outfit = 'Shirt';
- shoes = 'Moccasins';break;
- }
- }else if(gradus > 18 && gradus <= 24){
- switch(weather){
- case 'Morning': outfit = 'Shirt';
- shoes = 'Moccasins';break;
- case "Afternoon": outfit = 'T-Shirt';
- shoes = 'Sandals';break;
- case "Evening": outfit = 'Shirt';
- shoes = 'Moccasins';break
- }
- } else if(gradus >= 25){
- switch(weather){
- case 'Morning': outfit = 'T-Shirt';
- shoes = 'Sandals';break;
- case "Afternoon": outfit = 'SwimSuit';
- shoes = 'Barefoot';break;
- case "Evening": outfit = 'Shirt';
- shoes = 'Moccasins';break
- }
- }
- console.log(`It's ${gradus} degrees, get your ${outfit} and ${shoes}.`);
- }
Advertisement
Add Comment
Please, Sign In to add comment