Thank you for help.

I understood this.

Thanks again!


On Jun 10, 5:42 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>
> > if use prototype.js, can't use "for..in" for Array object ?
>
> Correct, and even if not using Prototype, you shouldn't use for..in
> for that.  That's not what it's for.  More 
> here:http://proto-scripty.wikidot.com/prototype:tip-looping-through-arrays
>
> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Jun 10, 3:15 am, favril <hsanog...@gmail.com> wrote:
>
> > use prototype-1.6.0.3
>
> > ---- code ----
> > var array = [];
> > console.log('length: ' + array.length);
> > for(var i in array) {
> >   console.log('key: ' + i);
> >   console.log('val: ' + array[i]);}
>
> > ----/ code ----
>
> > ---- result ----
> > length: 0
> > key: each
> > val: function (iterator, context) { ... }
> > key: eachSlice
> > val: function (number, iterator, context) { ... }
> >   ...
> > key: toJSON
> > val: function () { ... }
> > ----/ result ----
>
> > if use prototype.js, can't use "for..in" for Array object ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to