W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: Storage 'length' and enumeration

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 30 Apr 2009 00:34:33 +0000 (UTC)
To: John J Barton <johnjbarton@johnjbarton.com>
Cc: Sean Hogan <shogun70@westnet.com.au>, public-webapps@w3.org
Message-ID: <Pine.LNX.4.62.0904300034250.829@hixie.dreamhostps.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT