1. napi_status napi_set_element(napi_env env,
    2. napi_value object,
    3. uint32_t index,
    4. napi_value value);
    • [in] env: The environment that the N-API call is invoked under.
    • [in] object: The object from which to set the properties.
    • [in] index: The index of the property to set.
    • [in] value: The property value.

    Returns napi_ok if the API succeeded.

    This API sets and element on the Object passed in.