tedo1111

js

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