Sign in Go Pro

Beginning JavaScript for React Native

Null and Undefined

 
Autoplay

Up next

Previous

About

Null and undefined are two special primitive types in JavaScript. A variable is undefined if its value is not yet set. A value can have a null value if it has been set to null - representing "empty" or "nothing".

Null and undefined are similar concepts, but are different in practice - so make sure you know which to check for when in your code.

Summary of Content:

  • Null and undefined are primitive types
  • They represent similar - but different things about your variable
  • Both null and undefined convert to a boolean value of false

Resources:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Beginning JavaScript for React Native