isNumber - type check function

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

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com