Choose where you’d like to start

isNumber()

Overview

The isNumber() function takes an expression as an argument, and returns true if it is a valid numerical value. Otherwise, it returns false.   

Return Type

  • Boolean

Syntax

<variable> = isNumber( <expression> );
(or)
<variable> = <expression>.isNumber();

Valid numerical values in single or double quotes will return true.

List and Key-value data type will always return a null value.

ParameterData typeDescription
<variable>BOOLEANVariable which will contain the returned boolean value.
<expression> -

Examples

 numValue = isNumber ("12.3"); // returns true
 numValue = "1".isNumber (); // returns true
 numValue = 24.isNumber (); // returns true
 numValue = (24/2*10).isNumber (); // returns true
 numValue = "24/2*10".isNumber (); // returns false

Get Started Now

Execute