NOTE
It’s strongly recommended that you create a playground for each link shared below.
Try out the code, experiment, and take note of the results.
You can use the playgrounds you create as a reference (a note) to look back on in the future.
Conditional statements allow us to selectively run blocks of code when given a condition is true. If needed, we can check multiple conditions.
If we need to check many conditions and run different code for each condition, a switch statement might be easier to use.
We can use for loops to repeat a block of code a fixed number of times.
When we need to repeat a block of code as long as a condition remains true, that’s a job for a while loop.
Operators allow us to assign values to a variable or a constant, perform arithmetic, or make comparisons.