JSVAL_IS_DOUBLE

Obsolete since JSAPI 32
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Determines if a given jsval is a number represented as a jsdouble.

Syntax

JSVAL_IS_DOUBLE(v)

Description

JSVAL_IS_DOUBLE(v) is true if v is a number represented in memory as a jsdouble.

To check whether v is a number, regardless of implementation details, use JSVAL_IS_NUMBER instead.

Example

The following code snippet illustrates how a JavaScript variable, MyItem, is conditionally tested in an if statement to see if it is a JS double data type.

if (JSVAL_IS_DOUBLE(MyItem)) {
    . . .
}

See Also