From fdb28666feaf5bbf1472a70037eb1fc311fdb95a Mon Sep 17 00:00:00 2001 From: Fatih Altinok Date: Sat, 22 Feb 2020 01:04:53 +0300 Subject: [PATCH] Add negative zero There are two gotchas that strict equality has, `NaN` and zeroes. Adding negative zero further illustrates that strict equality is not enough and we need [Object.is](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#Description). A further pull request can add `Object.is` to the legend. --- unified/unified_comparison_table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified/unified_comparison_table.js b/unified/unified_comparison_table.js index 22271ad..832aebb 100644 --- a/unified/unified_comparison_table.js +++ b/unified/unified_comparison_table.js @@ -77,7 +77,7 @@ */ - values = [true, false, 1, 0, -1, "`'true'`", "`'false'`", "`'1'`", "`'0'`", "`'-1'`", "", "`null`", "`undefined`", "`[]`", "`{}`", [[]], [0], [1], "`parseFloat('nan')`"]; + values = [true, false, 1, 0, -0, -1, "`'true'`", "`'false'`", "`'1'`", "`'0'`", "`'-1'`", "", "`null`", "`undefined`", "`[]`", "`{}`", [[]], [0], [1], "`parseFloat('nan')`"]; (function() { var testRepr;