less
The less() method checks whether a number is less than or equal to (<=) a given threshold. It can be used in a curried way to ease functional composition.
Interactive example
Syntax
Classic signature
typescript
function less<
GenericInput extends number
>(
input: GenericInput,
threshold: number
): booleanCurried signature
typescript
function less<
GenericInput extends number
>(
threshold: number
): (input: GenericInput) => booleanParameters
input: The number to compare (classic signature only).threshold: The comparison threshold.
Return value
returns true if the value is less than or equal to the threshold, false otherwise.
See also
lessThan- Checks whether a number is strictly less (<)greater- Checks whether a number is greater than or equal (>=)greaterThan- Checks whether a number is strictly greater (>)
