Mega Code Archive
Categories
/
Ruby
/
Array
Return the size of an array with either the size or length method
months = Array.new(12) months.size # => 12 # or: months.length # => 12