Note that the else
statement must be used in conjunction with an if
statement. You cannot use an else
statement on its own. If you only want to execute code when a condition is false without any other condition, you can use a single if
statement without an else
statement.