The zip method combines more than one list in a zipping fashion.
- View these examples as a runnable ruby script on GitHub.
- Practice this method as an interactive kata on Codewars!
Animals
animals = ["dogs", "ducks", "seals"] complexions = ["furry", "feathery", "slippery"] animals.zip(complexions) #=> [["dogs", "furry"], ["ducks", "feathery"], ["seals", "slippery"]]