Skip to content

Instantly share code, notes, and snippets.

@jessepollak
Created November 25, 2013 15:42
Show Gist options
  • Save jessepollak/7643297 to your computer and use it in GitHub Desktop.
Save jessepollak/7643297 to your computer and use it in GitHub Desktop.
What is zip?
array_1 = [1, 2, 3, 4, 5]
array_2 = [6, 7, 8, 9, 10]
zip(array_1, array_2)
=> [[1, 6], [2, 7], [3, 8], [4, 9], [5, 10]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment