I have an array that stores me some values like this:
array[0] = "string", "string"
array[1] = "string", "string"
array[2] = "string", "string"
array[3] = "string"
As you see sometimes i have 2 values on same index, but sometimes i don't. Then i need to push those values to another array, one value by one.
I can't use this:
for(var i= 0; i< 4 ; i++){
newarray.push(array[i][0]);
newarray.push(array[i][1]);
}
Otherwise i would push blank values (i guess).
How can i check if i have 2 values on that index or one value, so i can use a different circle?
Thank you!