name: duk_remove proto: | void duk_remove(duk_context *ctx, duk_idx_t index); stack: | [ ... val(index)! ... ] -> [ ... ... ] summary: |

Remove value at index. Elements above index are shifted down the stack by a step. If to_index is an invalid index, throws an error.

example: | duk_push_int(ctx, 123); duk_push_int(ctx, 234); duk_push_int(ctx, 345); /* -> [ 123 234 345 ] */ duk_remove(ctx, -2); /* -> [ 123 345 ] */ tags: - stack introduced: 1.0.0