1. Clean a Mixed Data Array
Background
A developer has an array from a JSON response containing numbers, booleans, and nulls.
Problem
The array has falsey values that interfere with calculations.
How to use
Input the array [0, 1, false, 2, "", 3, null, 4, undefined, 5, NaN] and click compact.
Outcome
The output is [1, 2, 3, 4, 5], with all falsey values removed.