Advertisement
DraconiusNX

Untitled

Sep 25th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function summerOutfit(data) {
  2.     var temp = Number (data[0]);
  3.     var time =  data[1];
  4.     var outfit = 0;
  5.     var shoes = 0;
  6.  
  7.     if (temp >= 10 && temp <= 18) {
  8.         if (time === "Morning") {
  9.             outfit = "Sweatshirt";
  10.             shoes = "Sneakers";
  11.         } else {
  12.             outfit = "Shirt";
  13.             shoes = "Moccasins";
  14.         }
  15.     } else if (temp > 18 && temp <= 24) {
  16.         if (time === "Afternoon") {
  17.             outfit = "T-Shirt";
  18.             shoes = "Sandals";
  19.         } else {
  20.             outfit = "Shirt";
  21.             shoes = "Moccasins";
  22.         }
  23.     } else {
  24.         if (time === "Morning") {
  25.             outfit = "T-Shirt";
  26.             shoes = "Sandals";
  27.         } else if (time === "Afternoon") {
  28.             outfit = "Swimsuit";
  29.             shoes = "Barefoot";
  30.         } else {
  31.             outfit = "Shirt";
  32.             shoes = "Moccasins";
  33.         }
  34.     }
  35.     console.log(`It's ${temp} degrees, get your ${outfit} and ${shoes}.`)
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement