How can I use a string as an array index?
Created May 7, 2012
Firat Tiryaki When initializing the value, just use the desired index, as in the following:
myarray=new Array();
myarray["blah"]="blah blah blah";
myarray["blah"]="blah blah blah";
the "blah" indexed element of myarray is equal to "blah blah blah" now.