I have a sparse array in Jscript, with non-null elements occuring at both negative and positive indices. When I try to use a for in loop, it doesn't traverse the array from the lowest (negative) index to the highest positive index. Instead it returns the array in the order that I added the elements. Enumeration doesn't work either. Is there any method that will allow me to do that?
example: arrName = new Array (); arrName [-10] = "A"; arrName [20] = "B"; arrName [10] = "C";
When looping through, it should give me A then C the B