The map method can be used to create a new array based on the original array, but with the values modified by the supplied block: arr.map {|a| 2*a} #=> [2, ...
確定! 回上一頁