DEV Community

Discussion on: JS Minute - The 6-8ish Language Types in JavaScript

Collapse
 
worc profile image
worc

Null: Think of this as another way of writing "not applicable."

i think that's a little inaccurate. or it can be. null as a concept and an implemented feature of the language can be such a pain in the ass. that said i mdn's definition is a pretty decent ideal to try to live up to:

The value null represents the intentional absence of any object value. It is one of JavaScript's primitive values.

so, in an ideal world we should trust and believe that null is intentional and there's no value there to work with. so we should be thinking of it as more "yes that variable/property exists, but there's no value here".

Collapse
 
mcespo profile image
Marvin CĂ©spedes • Edited

That's really nice. I very much had subconsciously made my own assumptions of null without even realizing that it was a bit off. Thank you so much. I went ahead and made the edit to null on the post as a result. Thanks again.