if statement
Conditional code block
An if statement is a programming construct that executes code only when a specified condition is true: The if statement checks whether the user is logged in before showing the dashboard.
Most programming languages extend this with else clauses for alternative paths and else-if chains for multiple conditions.
The if statement is fundamental to controlling program flow—nearly every program of any complexity uses them.
- elseIndicating an alternative
- conditionState or stipulation
- booleanTrue-or-false valued
- truth valueProposition's logical standing
- branchDivision or woody limb
then · true · false · logic · code · code block · switch · conditional · test · check · early return · flow · control · programming · decision · decision tree · execute · block
- shell scriptingbash, shebang, scripts, source, sourcing
- conditionalsif, then, if clause, if clauses, else
- C Programmingint, char, float, double, void
- codefunction, source code, variable, array, class
- JavaScriptJavaScript, function, JS, variable, array
- programmingvariables, functions, for, function, debugger
if statementloop
Curve closing on itself
while loop · for loop · iteration · recursion · pattern matching
statement, state, stating, stated, states, stately, statesman, statehood, understate