Advertisement
GalinaKG

Untitled

Feb 13th, 2022
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function weatherForecast2 (input) {
  2. let degreece = Number(input[0]);
  3. if(degreece <= "4.9") {
  4. console.log("unknown");
  5. } else if(degreece <= "11.9") {
  6. console.log("Cold");
  7. } else if(degreece <= "14.9") {
  8. console.log("Cool");
  9. } else if(degreece <= "20") {
  10. console.log("Mild");
  11. } else if(degreece <= "25.9") {
  12. console.log("Warm");
  13. } else if(degreece <= "35") {
  14. console.log("Hot");
  15. }
  16. }
  17. weatherForecast2(["5"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement