3 ms·
In JavaScript there's a distinction between 'null' and 'undefined'. You can pick your own semantics for them but I think 'undefined' more or less means "not kn
by galaxyLogic 7y ago
In JavaScript there's a distinction between 'null' and 'undefined'.
You can pick your own semantics for them but I think 'undefined' more or less means "not known" while null means "known not to exist".
- Vanit 7y agoAgreed, but just wanted to add the context that you get undefined values by trying to access uninitialised things such as out of bounds array elements, get on a map-like object with a key that's yet to be set, unset properties on a object, return value of a function that returns void, etc.