@Rüdiger: > And last but not least, if this is a prototype mailing list you should > of course use prototype, so your loops would look like this:
Whether I'm using Prototype or not, I don't need to create a function and incur the overhead of a function call on every iteration (not to mention the complications around `this`) just to loop through an array. People are free to do that if they like, but it's not remotely necessary and it's certainly not always appropriate. There's nothing wrong with a nice, simple `for` loop. Just my two cents. -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Jan 19, 3:18 pm, Rüdiger Kaatz <[email protected]> wrote: > And last but not least, if this is a prototype mailing list you should > of course use prototype, so your loops would look like this: > > $A(array_b_length).each(function(arrayElement) { > // do something with the element... > > > > > > > > }); -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
