kcl →
assertGreaterThan
Check that a numerical value is greater than another at runtime,
otherwise raise an error.
assertGreaterThan(left: number, right: number, message: string) -> ()
Arguments
Name | Type | Description | Required |
---|---|---|---|
left | number | Yes | |
right | number | Yes | |
message | string | Yes |
Returns
()
Examples
assertGreaterThan(2, 1, "2 is greater than 1")