Here is a general IF-Else call
you can have multiple else if statements as well..
remember that you check for errors before you run an condition check. gameSwitches.value(n) must be valid or the statement will fail.
JavaScript:
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
remember that you check for errors before you run an condition check. gameSwitches.value(n) must be valid or the statement will fail.