function coalesce(array) {
        if (!array) {
            return array;
        }
        return array.filter(function (e) { return !!e; });
    }
@returns a new array with all undefined or null values removed. The original array is not modified at all.