0

I would like to create the 4-dimensional global array and access it like presented in the code below, but I don't know how to do it. Any help is highly appreciated.

var foo = [[],[],[],[]];

foo[1][1][1][1] = 5;
foo[1][1][1][2] = 7;
...
...
...
foo[4][3][2][2] = 11;

function myFunction() {
  var a = foo[3][1][2][1];
}
zuriosam
  • 115
  • 1
  • 9

0 Answers0