DEV Community

Discussion on: Null vs Undefined in JavaScript in 1 min

Collapse
aminmansuri profile image
hidden_dude

I wonder why we even need an undefined in Javascript. Wouldn't it just be better to default to null?
I fail to see a scenario in which having undefined (vs null) is useful.

Collapse
bgopikrishna profile image
Gopi Krishna Author
Collapse
aminmansuri profile image
hidden_dude

yeah.. it just seems to say that having both is a bit redundant.