How can i fetch array which is inside of an array at different indexes.
Here my const variable X = [[{..}],[{..}]] contain values at different arrays inside of array X
[[{0:a}] , [{0:b}] , [{0:c}]]
const x = [[{0:a}] , [{0:b}] , [{0:c}]]
let y = null;
let index = 1;
y = x[index] //it does not get array from x first index array...
y = x[index]
//output [{…}]0: {0: -1}length: 1__proto__: Array(0)
I want to get this as output => [{0:b}]
I have const index = 1;
How can I get index 1 array into const z = null
initially const z
is initialized as nul