napi_get_array_length
functionv1js_native_api.hThis API returns the length of an array.
napi_status napi_get_array_length(napi_env env,
napi_value value,
uint32_t* result)
[in] env: The environment that the API is invoked under.[in] value:napi_valuerepresenting the JavaScriptArraywhose length is being queried.[out] result:uint32representing length of the array.
Returns napi_ok if the API succeeded.
This API returns the length of an array.
Array length is described in Section Array instance length of the ECMAScript Language
Specification.