Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 05

Coercion and equality

How values convert between types, the algorithms behind == and ===, and which comparison each API uses.
5 questions
  1. 010How does == decide whether two values are equal?Coming soonCoremedium
  2. 020Which values are falsy?Coming soonCoreeasy
  3. 030How does an object convert to a primitive?Coming soonCorehard
  4. 040Why does [] + {} give "[object Object]"?Coming soonmedium
  5. 050=== vs Object.is vs SameValueZero — which comparison does each API use?Coming soonmedium