Mozilla.com

Table of contents
  1. 1. Syntax
  2. 2. Description
  3. 3. Example
    1. 3.1. See Also
Table of contents
  1. 1. Syntax
  2. 2. Description
  3. 3. Example
    1. 3.1. See Also

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)) {
    . . .
}

Page last modified 20:10, 5 Sep 2008 by Jorend

Files (0)