Mega Code Archive

 
Categories / Ruby / Array
 

Set the size of an array (the number of elements in an array)

months = Array.new(12) # or like this: months = Array.new 12