I have the following JavaScripts objects:
var foo = {"foofoo":value};
var bar = {"barbar":value2}; //and so on
these objects will be added to several arrays:
var container = [foo, bar, baz, etc];
var container2 = [foo, bar, glob, etc]; //and so on, for lots of containers.
If I have a lot of objects (such as foo) that get put in these arrays, would it be advantageous to use some kind of hashcode table and store objects by some kind of UID? Or does JavaScript's passing by reference give me that feature already?
http://www.timdown.co.uk/jshashtable/ seems to provide such a function.
Sorry but my knowledge of JavaScript is not too comprehensive.
Edit: I suppose another way to re-phrase this question more generally - is there any case in which a hash table is useful for a language (like JavaScript) that passes objects by reference?