Built In Array of Built In Arrays

Hello everyone,

Well, I have some arrays of booleans like so:

var arr1 : boolean[] = new boolean[3];
arr1[0] = false;
arr1[1] = true;
arr1[2] = true;

var arr2 : boolean[] = new boolean[3];
arr2[0] = false;
arr2[1] = false;
arr2[2] = true;

var arr3 : boolean[] = new boolean[3];
arr3[0] = false;
arr3[1] = true;
arr3[2] = false;

But instead of having different variable declared globally I’d like to make an array of the arrays

In UnityScript it would have been like:

var usArray : Array = new Array();
usArray.Add ( arr1, arr2, arr3 );

And then call them when needed. But I’d like to learn how to use the Js Array as less as possible.

So if anyone can give some tips, that would be great!

Thanks in advance guys!

var arr2D1 : boolean[,] = new boolean[2,3] {{true,true,true},{false,false,false}};

Here’s a 2D array for you. Hopefuly that works.

You could also use lists like this which im very fond of. <3 List