How does one implement a local storage array?
<p>I tried what made sense:</p>

<p>In the module below <code>localStorage.foo</code> works but <code>localStorage.session_array['privacy']</code> returns undefined.</p>

<p>This is prototype code for modern broswsers.</p>

<pre><code>var ISession = ( function () 
{

    localStorage.session_array = 
    {
        privacy:            0
    };

    localStorage.foo = 1; 

    var SessionI = function ( ) 
    {
    };

    SessionI.prototype.get = function( type ) 
    {
        return localStorage.session_array[ type ];
    };

    SessionI.prototype.set = function( type, value ) 
    {
        localStorage.session_array[ type ] = value;
        alert( '|' + localStorage.foo ); // returns 1
        alert( '|' + localStorage.session_array[ 'privacy' ] ); // returns undefined
    };

    return SessionI;

} ) ();
</code></pre>

<p>In the mean while I'm just going to implement this using non array properties.</p>
