Maybe an alternative: var res = $A([arr1,arr2]).flatten();<br><br>hth<br><br>sigi<br><br><div><span class="gmail_quote">On 4/24/06, <b class="gmail_sendername">Jeremy Kitchen</b> <<a href="mailto:kitchen@scriptkitchen.com">
kitchen@scriptkitchen.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is there no better way to merge one array into another than iterating over the
<br>array you wish to append with each() and push()ing the elements on to the<br>other array?<br><br>Here's what I mean:<br>var arr1 = [1, 2, 3, 4, 5];<br>var arr2 = ['a', 'b', 'c'];<br>$A(arr2).each(function(el) { arr1.push
(el) });<br><br>Is there no better way to do it than this?<br><br>Thanks!<br><br>-Jeremy<br><br><br>_______________________________________________<br>Rails-spinoffs mailing list<br><a href="mailto:Rails-spinoffs@lists.rubyonrails.org">
Rails-spinoffs@lists.rubyonrails.org</a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs">http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs</a><br><br><br><br></blockquote></div><br><br clear="all">
<br>-- <br>Mit freundlichen Grüßen<br><br>Siegfried Puchbauer