This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Many programming languages have one “non-value” called null
. It indicates that a variable does not currently point to an object – for example, when it hasn’t been initialized yet.
In contrast, JavaScript has two such non-values: undefined
and null
. In this blog post, we examine how they differ and how to best use or avoid them.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

Dr. Axel Rauschmayer | Sciencx (2021-01-27T00:00:00+00:00) undefined
vs. null
revisited. Retrieved from https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.