undefined vs. null revisited

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 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.

[Read rest of post]


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » undefined vs. null revisited." Dr. Axel Rauschmayer | Sciencx - Wednesday January 27, 2021, https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/
HARVARD
Dr. Axel Rauschmayer | Sciencx Wednesday January 27, 2021 » undefined vs. null revisited., viewed ,<https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/>
VANCOUVER
Dr. Axel Rauschmayer | Sciencx - » undefined vs. null revisited. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/
CHICAGO
" » undefined vs. null revisited." Dr. Axel Rauschmayer | Sciencx - Accessed . https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/
IEEE
" » undefined vs. null revisited." Dr. Axel Rauschmayer | Sciencx [Online]. Available: https://www.scien.cx/2021/01/27/undefined-vs-null-revisited/. [Accessed: ]
rf:citation
» undefined vs. null revisited | Dr. Axel Rauschmayer | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.