Explain Null and Undefined in JavaScript

Technology CommunityCategory: JavaScriptExplain Null and Undefined in JavaScript
VietMX Staff asked 3 years ago

JavaScript (and by extension TypeScript) has two bottom types: null and undefined. They are intended to mean different things:

  • Something hasn’t been initialized : undefined.
  • Something is currently unavailable: null.