O'Reilly logo

JavaScript Absolute Beginner’s Guide by Kirupa Chinnathambi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

19. Null and Undefined

In This Chapter

Learn about when values don’t exist

Understand what to do with null and undefined

One of the great mysteries of the world revolves around making sense of null and undefined. Most code you see is littered with them, and you’ve probably run into them yourself a few times. As mysteries go, making sense of null and undefined isn’t particularly bizarre. It is just dreadfully boring...like the most boring (yet important) thing about JavaScript you’ll ever have to learn.

Onward!

Null

Let’s start with null. The null keyword is also sort of a primitive that fills a special role in the world of JavaScript. It is an explicit definition that stands for no value. If you’ve ever browsed through code others have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required