How to get array value without knowing the depth?

Suppose there is a large array of (simplified example)
var arr = [
 ["a" , "b"],
 ["c" , "d"]
 ]

Me from the outside, you may want to read it
arr[0][3]
it
arr[0][3][7][2]
it
arr[2]

How to do it?
July 9th 19 at 10:41
2 answers
July 9th 19 at 10:43
Solution
Recursion with a while loop - help.
A more precise hint at a more precise formulation of the problem.
July 9th 19 at 10:45
Solution
use shift() or pop()
or do you need to know the number of values in it?

Find more questions by tags JavaScript