WMLScript isInt() Function

The isInt() function returns a boolean value indicating whether a value can be converted to an integer by the parseInt() function. If it can, it returns true, otherwise it returns false.

Syntax

n = Lang.isInt(value)
Component Description
n Boolean value returned by the function.
value Any value.

Example

var a = Lang.isInt("576");
var b = Lang.isInt("-576");
var c = Lang.isInt("6.5");
var d = Lang.isInt("@13");
var e = Lang.isInt("hello");

Result

a = true
b = true
c = true
d = false
e = false