You can use the conditional operators for defining functions. Watch this video to learn more about using conditional statements:
Evaluate the conditional statement at a point as follows:
elseif
alsoif
When you use elseif, the program stops evaluating statements when it reaches the first true statement. When you use alsoif, the program evaluates all alsoif statements. If any of them are true, the program does not evaluate any of the following else statements.