if (condition) {
/* code to run if condition is true */
} else {
/* run some other code instead */
}
if() designates the if functiontrue or falsetrue, the code executesfalse, the else code executestrue and false conditionsif (condition) {
/* code to run if condition is true */
} else if (another condition) {
/* code to run if condition is true */
} //exit if statement and run code below
caseswitch (expression) {
case choice1:
run this code
break;
case choice2:
run this code instead
break;
// include as many cases as you like
default:
actually, just run this code
}