Advertisement
Guest User

90/100 weather forecast 2

a guest
Jan 21st, 2020
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function weatherForecast2(input) {
  2.     let degree = Number(input.shift());
  3.     if (degree >= 26) {
  4.         console.log("Hot");
  5.     } else if (degree >= 20.1   ) {
  6.     console.log("Warm");
  7. } else if (degree >= 15) {
  8.     console.log("Mild");
  9. } else if (degree >= 12) {
  10.     console.log("Cool");
  11. } else if (degree >= 5) {
  12.     console.log("Cold");
  13. } else if (degree <= 0) {
  14.     console.log("unknown");
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement