Less-than test

Learn how to check if a value is less than another.

This test checks whether a value is less than another value. In terms of semantics, this test is equivalent to the less than operation.

Syntax

This test has the following syntax:

/*<value>*/ is less than /*<reference>*/
Try in Playground

To negate the test, you can write:

/*<value>*/ is not less than /*<reference>*/
Try in Playground

Parameters

These are the supported parameters:

value

The value to compare with a reference value.

reference

The reference value for comparison.

Examples

Here is a basic example of how to check whether a value is less than another value:

1 + 2 is less than 4 // true
Try in Playground