We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


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.

Determine if a given jsval is null.




JSVAL_IS_NULL(v) is true if v is JSVAL_NULL, which is the JavaScript null value.

(Note: JSVAL_IS_OBJECT(JSVAL_NULL) is also true.)


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.

if (JSVAL_IS_NULL(MyItem)) {

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Jorend, alecananian
 Last updated by: arai,