Entry: JS_GetArrayLength (Function)
Summary: Retrieves the number of elements in an array object.
Syntax:
JSBool JS_GetArrayLength(JSContext *cx, JSObject *obj,
jsint *lengthp);
Argument Type Description
cx JSContext * Pointer to the JS context for the object.
obj JSObject * Array object for which the number of array elements.
lengthp jsint * Variable in which to report the number of array elements.
Description:
JS_GetArrayLength reports the number of elements in an array object, obj. If the number of elements can be determined, JS_GetArrayLength reports the number of elements in lengthp and returns JS_TRUE. Otherwise, it sets lengthp to NULL and returns JS_FALSE.
See also:
|
|
|