This function determines whether the provided value is a error or not.
This function does not generate a change.
is_err(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the given value is an error, else it returns false
.
This code shows some return values for is_err():
[
is_err( err() ),
is_err( zero_div_err() ),
is_err( try((1 / 0)) ),
is_err( try((1 / 1)) ),
];
Return value in JSON format
[
true,
true,
true,
false
]