Hi, I have a statement like var a = {}; Does that mean a is an object or an array? Also, later in the code I have something like a.name = "temp"; a.age = 25; etc., Now, how do I access a's variables dynamically? i.e a method like getDetails(fieldname){ return ( a.eval(fieldname)); } But eval() throws an error in IE. Any suggestions please. thanks.
Yes, var a{}; is an object, you're declaring it using Object Literal notation. Check the wikipedia page for Object_literal. You seem to have answered your other question in a followup post.