M
mk834tt
When you use an object as an assc array as in:
var aa = new Array();
aa["peanuts"] = 2.50;
aa["popcorn"] = 3.50;
....
Is there a way to determine the number of entries?
So far I count this way: for (var x in aa) num_in_aa++;
How do you sort these? Is there a way to sort within the for/in
construct, something like
for(var x in 'sort aa') ????
Thanks.
var aa = new Array();
aa["peanuts"] = 2.50;
aa["popcorn"] = 3.50;
....
Is there a way to determine the number of entries?
So far I count this way: for (var x in aa) num_in_aa++;
How do you sort these? Is there a way to sort within the for/in
construct, something like
for(var x in 'sort aa') ????
Thanks.