Hi,
You have 2 different ways to use Array.
1; "traditional" way
var array = new Array();
array[0] = 'a';
array[1] = 'b';
etc...
get values:
for(var i=0; i<arr.length; i++) {
} // Michael is right
2; Associative array (something like hashtable, key/value pairs)
var associativeArray = {};
associativeArray['first item'] = 'this is the 1st';
associativeArray['second item'] = 'this is the 2nd';
associativeArray['however item'] = new Array();
etc...
get values:
for(var key in associativeArray)
{
var myVal = associativeArray[key];
}
I hope it helps.
Regards
Zozi
ziv Rosenzweig schrieb:
> This is only one scenario. I use the Array object as a helper for Hashtable.
> And because of that it looks like I have a key named "clear" or addRange.
>
> Do I have a way to remove the added functions? What are they used for?
>
>
> On 7/19/06, Michael Schwarz <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > have a look at this url:
> >
> >
> > http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Object_Manipulation_Statements
> >
> > it defines that it is used to iterate over properties and not array
> > items. For array items use:
> >
> > for(var i=0; i<arr.length; i++) {
> > }
> >
> > Regards,
> > Michael
> >
> >
>
> ------=_Part_108346_24950162.1153325417399
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 1058
>
> <div>This is only one scenario. I use the Array object as a helper for
> Hashtable.</div>
> <div>And because of that it looks like I have a key named "clear"
> or addRange.</div>
> <div> </div>
> <div>Do I have a way to remove the added functions? What are they used
> for?<br><br> </div>
> <div><span class="gmail_quote">On 7/19/06, <b
> class="gmail_sendername">Michael Schwarz</b> <<a href="mailto:[EMAIL
> PROTECTED]">[EMAIL PROTECTED]</a>> wrote:</span>
> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px
> 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hi,<br><br>have a look at this
> url:<br><br><a
> href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Object_Manipulation_Statements">
> http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Object_Manipulation_Statements</a><br><br>it
> defines that it is used to iterate over properties and not array<br>items.
> For array items use:<br><br>for(var i=0; i<
> arr.length; i++) {<br>}<br><br>Regards,<br>Michael<br><br></blockquote></div>
>
> ------=_Part_108346_24950162.1153325417399--
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---