We have one array which contains values and empty strings, what we are trying to do is if 2 or more values are coming continuously we want to concatenate them in one index by setting tab as delimiter, but what is happening is, it is concatenating all the values in one index only even if there is empty string between two indexes.
below i am attaching the code with the input and the expected output and the output that we are getting.