I have this object/array thing:
var states = {};
states["CA"] = new State("CA", "California");
states["AR"] = new State("AR", "Arizona");
....
How can I check if states["AL"]
has been set or not? Will the following work (in all browsers)?
if (states["AL"] == undefined)
alert("Invalid state");