Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Temperature Advisor | Conditional Statements
Introduction to JavaScript

Swipe to show menu

book
Challenge: Temperature Advisor

Task

Swipe to start coding

Write a program that gives clothing advice based on the temperature.

Use an if-else statement to check:

  • If the temperature is above or equal to 25Β°C, output: "It's warm outside. Wear light clothes!".
  • Otherwise, output: "It's cold outside. Wear a jacket!".

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 9

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

book
Challenge: Temperature Advisor

Task

Swipe to start coding

Write a program that gives clothing advice based on the temperature.

Use an if-else statement to check:

  • If the temperature is above or equal to 25Β°C, output: "It's warm outside. Wear light clothes!".
  • Otherwise, output: "It's cold outside. Wear a jacket!".

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 9
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt