let arrs = [[1, , 3, 4, 5,], [, 2, 3, 4, 5, 234,], [, , ,]]; console.log( arrs.reduce((acc, cur) => { let items = cur.filter(item => item !== null) items.length && acc.push(items) return acc }, []) )