const arr=[ [ ], [ ], [ ] , [ ] , [ ] , [ ] , [ ] ]
// after some insertions my array looks like arr : [a , b] , [ ] , [ ] ............
//
for(let i = 0; i < arr.length ; i++)
{
if(arr[position][i] == selected_option) // is true for this case
{
console.log(arr[0][0]); // prints a
console.log(arr[0][1]); // prints b
arr[0].splice(1,1); // does not remove "b" from array
arr.splice(i, 1); // this syntax also does not removes "b" from array
}
Its not deleting the index whose value is b! Please help