if (Test for something)
Sometimes, if the test is false, you don't want to do anything. In this case, you can leave out the else and the second set of curly braces. Sometimes you want to test for one of several things. Often the best way to do this is to combine a series of if ... else statements. When you do this, you usually write it as:
if (First Test)
else if (Second Test)
This site needs an editor - click to learn more!
You Should Also Read:
Editor's Picks Articles
Top Ten Articles
Content copyright © 2022 by Julie L Baumler. All rights reserved.
This content was written by Julie L Baumler. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.