Well, in javascript, any object is an expando object. This means that, as the article says, whenever you try to access property 1, it will be automatically created.
var myObj = {};
The moment you assign myProp value, the myProp property myProp dynamically created, but it did not exist before. In many other languages, such as C #, this is usually not possible (in fact, C # just turned on support for the expando object, but that is beyond the point). To access a property in a normal class in C #, you need to indicate in the class that it really has this property.
1 Not quite right. See npup Comment below for clarification.
David Hedlund Mar 24 '10 at 7:39 2010-03-24 07:39
source share