The local storage is based on name/value pairs, like all associative containers in Javascript (essentially all Javascript object, including arrays, are such associative arrays):
http://en.wikipedia.org/wiki/JavaScript#Dynamic[
^],
http://en.wikipedia.org/wiki/Associative_arrays[
^].
Please see how it works:
http://diveintohtml5.info/storage.html[
^].
The associated container does not have certain size: the size grows as you add data. Let's see how it works with a single array indexed by integers:
localStorage[10] = "the value @10";
localStorage[111] = "the value @111";
alert(localStorage[10]);
Likewise, you can have array of arrays, which you can simply interpret as the array indexed with
compound index, which can be, in this case, just a pair of indices:
localStorage[1,13] = "the value @[1,13]";
localStorage[111] = "the value @112";
alert(localStorage[1,13]);
By definition, you will have more flexibility than you expected: you will get
jagged arrays:
http://en.wikipedia.org/wiki/Jagged_array[
^].
That's all.
—SA