PDA

View Full Version : Named element of array (in JavaScript)


barbiturat
06-07-2005, 02:35 AM
Question about JavaScript:
It's possible to address to element of array by his name, not by index? I got accustomed to do that in ActionScript (flash).

tarundhillon
06-07-2005, 09:00 AM
Well i dont think that is possible in javascript

Jon Hanlon
06-07-2005, 06:10 PM
myArray[3] = "4th element"
myArray["london"] = "england"
myArray["lawn"] = 17