November 2022
Beginner
624 pages
13h 39m
English
In this Chapter
Use the popular if/else statement to help make a decision in code
Learn about switch statements and when to use them
From the moment you wake up, whether you realize it or not, you start making decisions. Turn the alarm off. Turn the lights on. Look outside to see what the weather is like. Brush your teeth. Put on your robe and wizard hat. Check your calendar. Basically…well, you get the point. By the time you step outside your door, you consciously or subconsciously will have made hundreds of decisions, with each one having a certain effect on what you ended up doing.
For example, if the weather looks cold outside, you might decide to wear a hoodie or a jacket. You can model ...
Read now
Unlock full access