=proto void duk_dup(duk_context *ctx, int from_index); =stack [ ... val! ... ] -> [ ... val! ... val! ] =summary
Push a duplicate of value at from_index to the stack. If from_index is invalid, throws an error.
=example duk_push_int(ctx, 123); /* -> [ ... 123 ] */ duk_push_int(ctx, 234); /* -> [ ... 123 234 ] */ duk_dup(ctx, -2); /* -> [ ... 123 234 123 ] */