The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.
Array of arrays
In the first example, 3 teams are stored in an array. Each team itself is an array of names. The individual teams have different sizes. With
var teams = [ ['Ruby', 'Angel'], ['Mia', 'Yui', 'Merve', 'Elif'], ['Saanvi', 'Giulia', 'Zeynep'] ]; var row1 = [4, 9, 2]; var row2 = [3, 5, 7]; var row3 = [8, 1, 6]; var loshu = [row1, row2, row3];
you can access a team and with
var team = teams;
you can access an individual team member.
var member = teams;
Arrays that contain arrays are also called two-dimensional arrays. Carrying this on, you get three- or multidimensional arrays.
In the second example, the Lo Shu Square is stored in a two-dimensional array.
flatthat flattens a two-dimensional array with 3 entries.
[4, 9, 2, 3, 5, 7, 8, 1, 6]. Thereby
loshuis the magic square from the example above.