Hoppa till huvudinnehåll

JavaScript equality table

· En minut att läsa
Filip Tammergård
Software Engineer at Einride

I recently stumbled upon the JavaScript equality table. I'm always impressed by nice ways of visualizing such concepts. And I immediately thought it would be a fun thing to build myself!

Choose between double equals and triple equals to see how that affects the equality table.




truefalse10-1"true""false""1""0""-1"""nullundefinedInfinity-Infinity[]{}[[]][0][1]NaN
true
false
1
0
-1
"true"
"false"
"1"
"0"
"-1"
""
null
undefined
Infinity
-Infinity
[]
{}
[[]]
[0]
[1]
NaN

References