A.each(function(value, i) { M[i][2] = value; });

On 8/26/06, Sam <[EMAIL PROTECTED]> wrote:
>
>
> What would be a prototype method of copying a vector array
>
> var A = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>
> into column 2 of a matrix array
>
> var M = [
>
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5],
>   [ 7, 6, 5]
> ]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to