Combining Arrays in Javascript
Posted
by
Bigbohne
on Stack Overflow
See other posts from Stack Overflow
or by Bigbohne
Published on 2011-03-05T23:59:58Z
Indexed on
2011/03/06
0:10 UTC
Read the original article
Hit count: 161
JavaScript
|arrays
Maybe it's to late in germany (1:04AM) or I'm missing something...
How can I combine these two arrays:
a = [1, 2, 3] and b = [a, b, c] so that i get: [[1, a], [2, b], [3, c]]
Thank and ... spend more time sleeping! :)
Edit:
Ok, i see this function i called "zip". +1 Knowledge
And there is no builtin function in Javascript for this. +1 Knowledge
And I should have said that the arrays are equal in length. -1 Knowledge
... = positiv day. Thx
© Stack Overflow or respective owner