1let myArray = ["user1","user2", "", ""]
2console.log(myArray)
3
4function cleanArray(_array) {
5 for (i in _array){
6 if(_array[i] == ''){
7 _array.splice(i, 1)
8 }
9 }
10 return _array
11}
12
13console.log(cleanArray(cleanArray(myArray)))