I'm not very familiar with Javascript and have come across something that I can't find an answer to so far, looking at the following code:
function gridWindow(visible) {
this.name='grid';
this.visible=visible;
this.defn={ gridText: ['aString1', 11], gridProp: ['aString2', 1], gridTime: ['aString3', 4] };
this.init();
}
My question is what is happening with this line from above:
this.defn={ gridText: ['aString1', 11], gridProp: ['aString2', 1], gridTime: ['aString3', 4] };
Is it creating an array? What do the numbers mean after each string (the 11, 1 and 4)? How would I retrieve a value from this kind of array?
Thanks.
{ gridText: ['aString1', 11] }creates a Javascript object with a property called gridText that has as its value an array with two entries. What the numbers mean is impossible to say.initfunction that is being called. It probably access these values inthis.defn.