if
keyword and then in some brackets, the condition. To specify the condition you simply write one value (either a variable or constant), then the comparison operator you want to compare them with (for example - equal to, which is ) and then the second value (either a variable or constant). We then put some curly brackets, and anything inside the curly brackets is what will be executed if the condition is true. For example, the following would compare 1 to 1 (which is a bit silly, but gives an example which is obviously always true):<
) and 'Greater Than' (>
) are relatively simple - they are simply their usual symbols, and so we could check if the user's height is greater than their age like this:!=
. So we could check if the user's height doesn't equal their age like so:else if
after your closing curly bracket for your original 'if' statement, and then specify your 'else if' condition followed by the curly brackets to contain the code to be executed if they are met. For example:else
keyword, and then some curly brackets to specify the code that could be executed at the end of our 'daisy chain':