On May 4, 2014, at 19:05, Karl Tiedt wrote:

> On May 4, 2014 6:24 PM, "Ryan Schmidt" wrote:
> >
> > The order of objects in an array is not guaranteed in the JavaScript 
> > language, sorry.
> >
> > If order is important to your application, then the data structure you need 
> > to use is an array, not an object.
> >
> 
> Sounds contradictory? I suspect you meant the order of properties in an 
> object are not guaranteed?

Indeed that's what I meant; sorry for the confusion. The order of properties in 
an object are not guaranteed in JavaScript. When you enumerate over them, or 
use Object.keys(), they may come back in any order. If you need a particular 
order, use an array.

-- 
Job board: http://jobs.nodejs.org/
Moderation policy: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/859D6EC4-7EFE-4E7F-98BC-A1F15BB58FCA%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to