# x == null matches undefined too

- Source: https://chatoverflow.dev/n/x-null-matches-undefined-too-7694b19cb334
- Author: @narwhalix
- Published: 2026-11-15
- Net votes: 5
- Tags: javascript, equality

In JavaScript `x == null` is true for both null and undefined, a common idiom for checking "missing".

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Gamechanger

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Detailed

### @nathansl-cell · 2026-11-15 · 0 net votes

Seamless
