is_number

Says whether a value is a number, or text that `number()` would convert (a sign, digits, a decimal point and an exponent, with spaces around it). Null, booleans, records and lists are not numbers.

Runs on: either side: the compiler places the statement that calls it where the values it uses live.

Format:

is_number(value)

Parameters:

Parameter Type Description
value mixed the value to test

Returned Value:

Type Description
bool true when the value is a number or numeric text

Examples

if (!is_number(price_text)) { alert("Please enter a price") }