If Statement

Programming conditional statement that, if proved true, performs a function or displays information. Below is a general example of an if statement, not specific to any particular programming language.

If (X < 10) {
print "Hello John";
}

In the example above, if the value of X were equal to any number less than 10, the program would print or, in other words display, "Hello John" on the console when the script is run. See the conditional statement definition for further information and some basic programming examples.

Related pages

Also see: Conditional expression, Else, Elseif, Exists, If else, Programming terms