Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function hello(input) {
- let text = (input[0]);
- if ([text].includes("sunny")) {
- console.log("It's warm outside!");
- }
- else if ([text].includes("cloudy")) {
- console.log("It's cold outside!");
- }
- else if ([text].includes("snowy")) {
- console.log("It's cold outside!");
- }
- }
- hello(["cloudy"]);
Advertisement
Add Comment
Please, Sign In to add comment