저는 Ruby를 처음 사용합니다. 나는이 도전을 시도하고 붙어있어. 다음과 같은 배열을 감안할 때 Ruby - 다른 배열의 각 요소에 액세스
:Name: Reddit, Wikipedia, xkcd
Address: www.reddit.com, en.wikipedia.net, xkcd.com
Description: the frontpage of the internet, The Free Encyclopedia, Sudo make me a sandwich.
지금까지 내 제한된 지식이가는대로, 내가 시도 titles.each { |title| print title }
하지만 I : 지금은
titles = ['Name', 'Address', 'Description']
data = [['Reddit', 'www.reddit.com', 'the frontpage of the internet'],
['Wikipedia', 'en.wikipedia.net', 'The Free Encyclopedia'],
['xkcd', 'xkcd.com', 'Sudo make me a sandwich.']]
, 나는 이런 식으로 뭔가를 인쇄하고 싶습니다 조직적 방법으로 다른 배열에서 해당 요소에 액세스하는 것을 후속 조치 할 수 없습니다. 이 문제에 대해 .each
이면 충분합니까?