Re: Storage 'length' and enumeration

On Wed, 29 Apr 2009, John J Barton wrote:
> Ian Hickson wrote:
> 
>  On Thu, 30 Apr 2009, Sean Hogan wrote:
>   
> 
>  sessionStore[2] = "howdy";
> print(sessionStore[2]); // prints null?
> print(sessionStore["2"]); // prints "howdy"
> 
> To my knowledge that's not consistent with any other object or interface 
> in the browser.
>     
> 
>  Unless I'm mistaken, they both print "howdy".
> 
>   
> 
> But earlier you said:
> 
>  >   for(var i = 0; i < sesssionStore.length; i++) foo(i, sessionStore[i]);
>  
> gives:
> 
>  (0, "2").
> 
> I don't think both of these can be true.

Why not?

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

Received on Thursday, 30 April 2009 00:35:08 UTC