name: duk_has_prop_index proto: | duk_bool_t duk_has_prop_index(duk_context *ctx, duk_idx_t obj_idx, duk_uarridx_t arr_idx); stack: | [ ... obj! ... ] -> [ ... obj! ... ] summary: |
Like duk_has_prop()
,
but the property name is given as an unsigned integer
arr_idx
. This is especially useful for checking
existence of array elements (but is not limited to that).
Conceptually the number is coerced to a string for property
existence check, e.g. 123
would be equivalent to a property
name "123"
. Duktape avoids an explicit coercion whenever
possible.