Combine two Arrays into Hash

前端 未结 7 1890
执笔经年
执笔经年 2020-12-01 01:44

I\'ve got two Arrays:

members     = [\"Matt Anderson\", \"Justin Biltonen\", \"Jordan Luff\", \"Jeremy London\"]
instruments = [\"guitar, vocals\", \"guitar\         


        
相关标签:
7条回答
  • 2020-12-01 02:40

    As Rafe Kettler posted, using zip is the way to go.

    Hash[members.zip(instruments)] 
    
    0 讨论(0)
提交回复
热议问题