Step 1 - Build the Project
The 'if' statement puts a branch into your code. It allows you to run a certain part of the code only when a condition is true.
Step 2 - Upload the Code
Step 3 - Read the Walkthrough
The "if" statement tests a condition and, if that condition is true, some code statements will run. If the condition is false, the 'if' statement is passed over.
You can create an “if” statement by itself or you can use it along with other “if” statements, “else if” statements, and “else” statements.
When you use an “else if” statement, its condition is checked only when the “if” statement before it is false.
When you use an “else” statement, it will always run when the “if” statement right before it is false. You cannot use “else if” and “else” without first using “if”.