I have the following array
[Array(1), Array(1), Array(0)]
Here is the formatted version
[{…}]
[{…}]
[]
How can I remove [] ?
So you have an array of arrays & you want to remove the empty array?
You can filter out the values you don't want by using .filter
E.g
const arr = [ [], ['1', '2'], ['3', '4'] ].filter(v => v.length > 0);
mainArray.pop()? :-D