didkoslawow

Untitled

Sep 16th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function weatherForecast (input) {
  2.  
  3. let warmWeather = "sunny";
  4. let coldWeather = "cloudy" && "snowy";
  5.  
  6. if(warmWeather == input[0]) {
  7. console.log("It's warm outside!")
  8. } else {
  9. console.log("It's cold outside!")
  10. }
  11.  
  12.  
  13.  
  14.  
  15. }
  16.  
  17. weatherForecast(["cloudy"])
Advertisement
Add Comment
Please, Sign In to add comment