The "If" Statement

The "If" statement is also known as a branch statement. It is a conditional operator to perform comparisons and to do one thing based on the expression returning something and to do something else if the expression returns something else.
if (weather == "nice") Draw.text(0,0,"The weather is nice.");
if (weather == "sunny") Draw.text(0,0,"The weather is sunny.");
Here you're checking if the variable weather is nice.
If the weather is nice, it will say the weather is nice.
If the weather is sunny, it will say the weather is sunny.
Because a variable cannot have two values, it will either return one or the other.

You can also use "else" instead of making a second comparision.
if (weather == "nice") Draw.text(0,0,"The weather is nice.");
else
Draw.text(0,0,"The weather is sunny."); // Given that the only other possible value is "sunny".
The "else" statement in use.

For values that return true or false, you don't have to use "if (variable == true)" or "if (variable == false)". Instead, you can use:
if (variable) // TRUE: do whatever
if (!variable) // FALSE: do whatever
"if (variable)" checks if the value returns true.
"if (!variable)" checks if the value returns false.

Note that you can also use "=" rather than "==", but "==" is preferable.