You could always do it recursively. ;-) If only JavaScript had tail
recursion!
function eraseArray(a) {
delete a[0];
if (a.length > 0)
eraseArray(a.slice(1));
}
-Fred
On Mon, Jun 23, 2008 at 4:02 PM, T.J. Crowder <[EMAIL PROTECTED]>
wrote:
>
> > I've solved this issue following:
>
> But....why?! Just set the length to zero. No need for all of the
> cloning and splicing!
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---