E-Learning Platform
0 of 139 builtAlways freeSign in
3.04 · Lab

Conditionals

One decision that depends on two things at once. Walk every combination and make sure each branch says what you meant it to say.

Exercise

Wire a weather decision

Checks itself — try as often as you like

Write a function called checkWeather that takes two parameters, temperature and isSunny, and returns a string:

  • "perfect beach weather" if temperature is greater than 65 *and* isSunny is true.
  • "grab a jacket" otherwise.