I would like to remove all falsy values from an array. Falsy values in JavaScript are false, null, 0, \"\", undefined, and NaN.
Just negate twice to "cast" to boolean. !NaN === true => !!NaN === false
!NaN === true
!!NaN === false
const truthy = arr.filter(o => !!o)