Mozilla.com
Some features of this site require JavaScript.
Main Page > SpiderMonkey > JSAPI Reference > JSVAL_IS_NULL
JSVAL_IS_NULL
Determine if a given jsval is null.
jsval
null
JSVAL_IS_NULL(v)
JSVAL_IS_NULL(v) is true if v is JSVAL_NULL, which is the JavaScript null value.
v
JSVAL_NULL
(Note: JSVAL_IS_OBJECT(JSVAL_NULL) is also true.)
JSVAL_IS_OBJECT(JSVAL_NULL)
The following code snippet illustrates how a JavaScript variable, MyItem, is conditionally tested in an if statement to see if it contains a null value.
MyItem
if
if (JSVAL_IS_NULL(MyItem)) { ... }
LXR ID Search for JSVAL_IS_NULL
Page last modified 20:07, 21 Aug 2008 by Jorend
Content is available under these licenses
About MDC
Viewing Details: