If … else if … else
From Pointui
If statements can evaluate complex expressions, but must always contain braces as seen here:
//invalid, won’t work if (condition) doSomething(); //supported, will work if (condition) { doSomething(); }
The following demonstrates an if statement with else if and else:
if (condition) { //… } else if (differentCondition) { //… } else { //… }
