Projects
More projects to come soon!
Ruby Hashes, Arrays, Strings, Integers
Ruby Integers
Ruby integers are whole numbers. Since there are no primitive types in Ruby, they are also the class that is the beginning for Fixnum and Bignum. You can reference the Ruby Docs here for integers.
Ruby Strings
Ruby strings are objects that hold and manipulate bytes of data, usually characters. You see strings surrounded by double or single quotations. You can reference the Ruby Docs here for strings.
Ruby Arrays
Ruby arrays are ordered collections of any object. They are ordered by index value. The array [0,1,2] has the value 0 at index 0, the value 1 at index 1, and the value 2 at index 2.
Arrays are great for collections of objects where you just want to store an ordered list. You can reference the Ruby Docs here here for arrays.
Hashes are better suited for any other type of collection.
Ruby Hashes
Ruby hashes are much like Arrays instead the index values are called keys. These keys can be any object type (including another hash). For a detailed description of the difference between arrays and hashes check out my other blog post here . You can reference the Ruby Docs here for hashes.
Hashes are better suited for any other type of collection.