...

View Full Version : hasmap or map?



khan8822
07-05-2005, 10:51 PM
is there hashmap or map in javascript?

i want to map my data using string

instead of 0 to whatever number

glenngv
07-06-2005, 03:44 AM
var hash = [];
hash["greet"] = "Hello world!";
hash["now"] = new Date();
hash["alertFunc"] = function(msg){
alert(msg);
}

var msg = hash["greet"] + " Today is " + hash["now"] + ".";
hash["alertFunc"](msg);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum