Null & Undefined

Learn two more variable types in JavaScript: null and undefined. Learn what they represent, how they differ, and how to use them.

We'll cover the following

There are two more variable types that we should discuss.

undefined

undefined is meant to represent the idea that something doesn’t exist. When we try to use a variable that has no value, we get undefined. Here’s an example.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy