Some Useful Ruby Tips Oct 22nd, 2013 | Comments 有時候要印出ruby array的內容,用for loop如果沒判斷index,最後又會多一個逗號或空格 1 2 nums = [1, 3, 5, 9, 15] puts nums * "," #=> "1,3,5,9,15"