Files

7 lines
474 B
Markdown
Raw Permalink Normal View History

2026-06-12 11:06:50 +02:00
# SameValueZero
SameValueZero is an equality algorithm used internally by JavaScript in methods like `Array.prototype.includes()` and `Map` key comparison. It behaves like `===` but treats `NaN` as equal to itself. Unlike `SameValue`, it considers `+0` and `-0` as equal.
2023-01-02 04:47:46 +04:00
Visit the following resources to learn more:
2026-06-12 11:06:50 +02:00
- [@article@Same-value-zero equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value-zero_equality)