Why does JavaScript has both undefined and null
What purpose do they serve
Why can't JavaScript use null for all unassigned values as Java?
Why does JavaScript has both undefined and null
What purpose do they serve
Why can't JavaScript use null for all unassigned values as Java?
Null means its set to a null set, like in Set Theory. But Null is still defined.
The logic for undefined naturally follows.
All these concepts are from Mathematics. In fact programming is essentially just Linear Algebra.