name: duk_strict_equals proto: | duk_bool_t duk_strict_equals(duk_context *ctx, duk_idx_t index1, duk_idx_t index2); stack: | [ ... val1! ... val2! ... ] summary: |

Compare values at index1 and index2 for equality. Returns 1 if values are considered equal using Ecmascript Strict Equals operator (===) semantics, otherwise returns 0. Also returns 0 if either index is invalid.

Because The Strict Equality Comparison Algorithm used by the Strict Equals operator performs no value coercion, the comparison cannot have side effects and cannot throw an error.

Comparison algorithm for Duktape custom types is described in Strict equality.

example: | if (duk_strict_equals(ctx, -3, -7)) { printf("values at indices -3 and -7 are strictly equal\n"); } tags: - compare seealso: - duk_equals introduced: 1.0.0