Use string as the array indexer in JavaScript

var x = new Array();
x["first"]  = "1st";
x["second"] = "2nd";
x["third"]  = "3rd";

alert(x.first + ", " + x.second + ", " + x.third);