SHARE
TWEET

90/100 weather forecast 2

a guest Jan 21st, 2020 121 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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top