I have an array which has some empty items.
const array = ["a","","c","","e","f","g"]
I am trying to eliminate empty items and leave only the items having string. I mean manipulating the array
as:
array = ["a","c","e","f","g"]
There are many alternative like array.map, array.filter, array.slice, array.splice.. What is the most costless and recommended way of doing this?