I have the following JavaScripts objects:
var foo = {"foofoo":value}; var bar = {"barbar":value2};
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 many objects (e.g. foo) that will be placed in these arrays, would it be useful to use some hashcode table and store the objects using some UID? Or is the JavaScript following the link giving me this function already?
http://www.timdown.co.uk/jshashtable/ seems to provide such a function.
Sorry, but my JavaScript knowledge is not too complete.
Edit: I assume another way to re-express this question as a whole is is there any case where a hash table is useful for a language (like JavaScript) that passes objects by reference?
source share