Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Weather-Based Outfit Recommender | Conditional Statements
Introduction to JavaScript

Veeg om het menu te tonen

book
Challenge: Weather-Based Outfit Recommender

Taak

Swipe to start coding

Write a program that suggests the user what to wear based on the weather conditions.

Use if-statements to check the weather and display an outfit recommendation:

  • If the weather is "sunny", print: "Wear sunglasses and a t-shirt!".
  • If the weather is "rainy", print: ``"Take an umbrella and wear a raincoat!".
  • If the weather is "cold", print: "Wear a warm jacket and a scarf!".

Note

Use the strict checks in the boolean expression.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 4

Vraag AI

expand
ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

book
Challenge: Weather-Based Outfit Recommender

Taak

Swipe to start coding

Write a program that suggests the user what to wear based on the weather conditions.

Use if-statements to check the weather and display an outfit recommendation:

  • If the weather is "sunny", print: "Wear sunglasses and a t-shirt!".
  • If the weather is "rainy", print: ``"Take an umbrella and wear a raincoat!".
  • If the weather is "cold", print: "Wear a warm jacket and a scarf!".

Note

Use the strict checks in the boolean expression.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 4
Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt