Less than operator: Difference between revisions
From Coderwiki
More actions
new |
m replace 'conditional operator' with 'comparison operator' |
||
| Line 1: | Line 1: | ||
One common [[ | One common [[comparison operator]] is the '''less than operator'''. | ||
This operator will return [[Boolean|true]] if the value on the '''left''' is '''less than''' the value on the '''right''' of the operator. | This operator will return [[Boolean|true]] if the value on the '''left''' is '''less than''' the value on the '''right''' of the operator. | ||
Latest revision as of 10:25, 9 August 2025
One common comparison operator is the less than operator.
This operator will return true if the value on the left is less than the value on the right of the operator.
Syntax
edit edit sourceIn most languages, the less than operator is represented by a < symbol.
Example
edit edit sourceboolean a = 4 < 6; // true
boolean b = 6 < 5; // false