Your first project
Time to put Unit 3 together! You'll build a small weather advisor that looks at the temperature and the chance of rain and tells you what to wear.
- Decide on clothes from the temperature (else if).
- Add rain advice (logical operators).
- Put it into one friendly sentence (template literal + ternary).
Plan before you code
Programmers sketch the rules in plain words first. Here are ours:
- Below 10°C → coat
- 10 to 19°C → jumper
- 20°C or more → t-shirt
- Rain chance 50% or more → also take an umbrella
Writing rules as a list first makes the code almost write itself. Each bullet becomes a condition.