Skip to main content
100%

null or undefined

✓ Published0🌍 Public
RRestuta
Last edited Sep 24, 2020
Created on Oct 13, 2017

This visualization compares JavaScript’s `null` and `undefined` through code examples, highlighting how destructuring defaults behave differently for each. It shows ES5 and ES6+ patterns where `undefined` triggers default values but `null` does not, and where null causes runtime exceptions without extra guards. The examples reference Douglas Crockford, TypeScript guidelines, and Lodash’s `_.find` to support choosing `undefined` over `null`. The dataset is the code snippets themselves, presented as a markdown document.

AI-generated description

Similar vizzes