Remove all falsy values from an array January 16, 2023 by Tarik You can use Boolean : var myFilterArray = myArray.filter(Boolean);