Re: Storage 'length' and enumeration

On Tue, 28 Apr 2009, John J. Barton wrote:
> 
> And then afterwards the |length| is ? one? three?

One.

> If I iterate
>   for(var i = 0; i < sesssionStore.length; i++) foo(i, sessionStore[i]);
> what can I expect in foo()?
>      (0, null), (1, null), (2, "2")
> or
>       (0, "2")?
> or ?

(0, "2").

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 29 April 2009 05:39:35 UTC