Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


This article needs a technical review. How you can help.

Determine if a specified object is an Array.


JS_IsArrayObject(JSContext *cx, JS::HandleValue value, bool *isArray);

JS_IsArrayObject(JSContext *cx, JS::HandleObject obj, bool *isArray);

// Obsolete since JSAPI 44

JS_IsArrayObject(JSContext *cx, JS::HandleValue value);

JS_IsArrayObject(JSContext *cx, JS::HandleObject obj);
Name Type Description
cx JSContext * A context.
value JS::HandleValue The value to examine.
obj JS::HandleObject The object to examine.
isArray bool Whether the value/object is an array.


JS_IsArrayObject determines if a specified object, obj or value, is an Array object.

On success, returns true and sets isArray indicating whether obj is an Array object or a wrapper around one. Otherwise returns false on failure.

See Also

Document Tags and Contributors

 Contributors to this page: Itms, arai, fscholz, Jorend, Dria, Nickolay, Tservo
 Last updated by: Itms,