I have resultant array like this,
[["apple","banana"],[],[],[],["kiwi"],[],[]]
How can I remove all the empty [] array so that my resultant array would look like this:
[["apple","banana"],["kiwi"]];
var array = [["apple","banana"],[],[],[],["kiwi"],[],[]];// sample array
splice()function provided in the Array prototype.var array = [["apple","banana"],[],[],[],["kiwi"],[],[]].filter((x) => { return x.length})