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
let teams = [ ['Ruby', 'Angel'], ['Mia', 'Yui', 'Merve', 'Elif'], ['Saanvi', 'Giulia', 'Zeynep'] ]; let row1 = [4, 9, 2]; let row2 = [3, 5, 7]; let row3 = [8, 1, 6]; let loshu = [row1, row2, row3];
you can access a team and with
let team = teams;
you can access an individual team member.
let 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.