JavaScript Equality Comparison Table
true false 1 0 -1 "true" "false" "1" "0" "-1" "" null undefined Infinity -Infinity [] {} [[]] [0] [1] NaN true false 1 0 -1 "true" "false" "1" "0" "-1" "" null undefined Infinity -Infinity [] {} [[]] [0] [1] NaN Not Equal Loose equality often gives false positives like "1" is true; [] is "0" Strict equality
A JavaScript comparison table shows how loose and strict equality behave across booleans, numbers, strings, nullish values, arrays, objects and NaN. The joke is the bewildering pattern of coercion results, especially that values which look unrelated can compare as equal with loose equality. It is commonly sent as a reaction to confusing JavaScript behavior or as programmer humor.
comparison table / таблица сравненийgreen grid / зелёная таблицаgray cells / серые ячейкиgreen cells / зелёные ячейкиequality symbols / символы равенстваboolean values / логические значенияnumbers / числаquoted strings / строки в кавычкахnull value / значение nullundefined value / значение undefinedInfinity / бесконечностьarrays / массивыobjects / объектыNaN value / значение NaNlegend / легенда
- @right_wing_dev_squads / 13559 2025-12-23
- Type
- image
- Size
- 800×630 · 101.6 KiB
- Mood
- confused, absurd
- Language
- en
- Added