KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a javascript equivalent of Python's zip function? That is, given multiple arrays of equal lengths create an array of pairs. For instance, if I have three arrays that look like this: var array1 = [1, 2, 3]; var array2 = ['a','b','c']; var array3 = [4, 5, 6]; The output array should be: var outputArray = [[1,'a',4], [2,'b',5], [3,'c',6]]
Tags (comma-separated)
Save Edits
Cancel