i need to make a dictionary in javascript like this
i dont remember the exact notation, but it was something like:
states_dictionary={ CT=[alex,harry], AK=[liza,alex], TX=[fred, harry] ........ }
is there such a thing in javascript?
i need to make a dictionary in javascript like this
i dont remember the exact notation, but it was something like:
states_dictionary={ CT=[alex,harry], AK=[liza,alex], TX=[fred, harry] ........ }
is there such a thing in javascript?
There are no real associative arrays in Javascript. You can try using objects:
var x = new Object();
x["Key"] = "Value";
However with objects it is not possible to use typical array properties or methods like array.length. At least it is possible to access the "object-array" in a for-in-loop.