This is, of course, a Javascript question, and the answer is not particular to InDesign, though I think you knew that.
The short answer is: You don't. Javascript does not guarantee anything about the positioning of members of an Object.
There is no guarantee that b will remain the second element, and there is no way to get the members of an Object by some kind of index other than their name.
BTW, you write:
myObject = ({a:3, b:5, c:8})
Which is overly complex (extra parens) and missing a line-terminating semicolon. This is better written as:
myObject = {a:3, b:5, c:8};
You can iterate over the names of the keys to myObject, with for (i in myObject) { ... }, but again there are no ordering guarantees. In ExtendScript, you could use myObject.reflect.properties to return the keynames in array form, but you'll get some extra junk and it's not really consider good practice to use the reflection objects in non-debugging code.
If you find yourself wanting to do this, you are probably not using Objects correctly.
Can you tell us more about the problem you are trying to solve, please?