45
loading...
This website collects cookies to deliver better user experience
Variable | Condition | Outcome |
---|---|---|
my age | greater than or equal to 18 | Legal to Drink Alcohol |
Condition | Operator | Description |
---|---|---|
Equals | == | Checks if the left hand part of the expression is equal to the right |
Not Equals | != | Checks if the left hand part of the expression is not equal to the right |
Greater Than | > | Checks if the left hand part of the expression is greater than the right |
Less Than | < | Checks if the left hand part of the expression is less than the right |
Modulus | % | Returns if there is a remainder left after division |
Greater Than Or Equal To | >= | Checks if the left hand part of the expression is greater than or equal to the right |
Less Than Or Equal To | <= | Checks if the left hand part of the expression is less than or equal to the right |
Logical Condition | Operator | Description |
---|---|---|
Logical AND | "&" | Checks both the left and right sides of the expression are both true, will ALWAYS check both sides - sometimes can less productive |
Conditional AND | "&&" | Only checks the right side of expression if the left is true. Otherwise it short-circuits to false, more efficient in most cases |
OR | || | Checks if either of the sides of the expression are true |