Conditional
In a conditional statement or expression the value of a condition determines which alternative pieces of code to execute.
Related concepts: StatementExpressionControl Flow
Closest Wikipedia entry: Conditional (computer programming)
Misconceptions about Conditional23 documented Misconceptions
Check YourselfBaseCaseNotNeeded — Java
Recursive computations do not necessarily need a base caseBaseCaseNotNeeded — Scratch
Recursive computations do not necessarily need a base caseConditionOneOutEdge — Java
A condition node in a control-flow graph can have a single outgoing edgeConditionalIsSequence — Java
If-else is equivalent to sequence of two ifsConditionalIsSequence — Scratch
If-then-else block is equivalent to sequence of two if-then blocksConditionalIsSequence — Python
If-else is equivalent to sequence of two ifsConditionalOperatorNotExpression — JavaScript
The conditional operator is not an expressionElsIf — Java
There is an elsif keyword for multi-way conditional statementsElseAlwaysExecutes — Java
The else branch of an if-else statement always executesElseAlwaysExecutes — Scratch
The else branch of an if-then-else block always executesForIsConditional — Java
The body of a for statement executes at most onceIfIsLoop — Java
The body of an if statement executes repeatedly, as long as the condition holdsIfIsLoop — Python
The body of an if-statement executes repeatedly, as long as the condition holdsIfRequiresElse — Java
Every if statement requires an elseLoopTerminatingCondition — Java
For and while loops end when the condition becomes trueMapToBooleanWithConditionalOperator — Java
To map a boolean expression to a boolean, a conditional operator is necessaryMapToBooleanWithIf — Java
To map a boolean expression to a boolean, an if statement is necessaryMapToBooleanWithIf — Python
To map a boolean expression to a bool, an if statement is necessaryMapToBooleanWithTernaryOperator — Python
To map a boolean expression to a bool, a ternary conditional operator is necessaryMissingElseTerminates — Scratch
Blocks following an if without else will not execute if the condition is falseRecursiveFunctionNeedsIfElse — Python
A recursive function needs to contain an if-else statementRecursiveMethodNeedsIfElse — Java
A recursive method needs to contain an if-else statementStatementMultipleOutEdges — Java
A non-condition node in a control-flow graph can have multiple outgoing edges