We've been using the if statement a lot in the past few weeks. They are so important that we want to take a step back and explain in more depth how and why if statements work.
If statements are used to check conditions. If such conditions hold, then the subsequent code will be executed.