name: duk_dup_top proto: | void duk_dup_top(duk_context *ctx); stack: | [ ... val! ] -> [ ... val! val! ] summary: |
Push a duplicate of the value at stack top to the stack. If the value stack is empty, throws an error.
Equivalent to calling
duk_dup(ctx, -1)
.