zip method

The zip method combines more than one list in a zipping fashion.

Animals

animals = ["dogs", "ducks", "seals"]
complexions = ["furry", "feathery", "slippery"]

animals.zip(complexions)
    #=> [["dogs", "furry"], ["ducks", "feathery"], ["seals", "slippery"]]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>