Ruby: Objects

Ruby objects: Strings, numbers, booleans, arrays, hashes

Strings are words or numbers between quotes. “apple” and “Atlantic Ocean” are strings.
Numbers are well, numbers! Ruby has two types, floats and integers. Floats are decimals like 3.14. Integers are positive or negative whole numbers like 75 or -10.

Booleans are true or false statements:
1 == 1 is a true statement.
1 == 5 is a false statement.

Arrays are lists of objects. They are another information type in Ruby, and are also objects themselves! We create an array by declaring the array name and listing the objects between brackets.

Hashes help us store information. They are another information type in Ruby, and are also objects. They are similar to arrays except objects are stored as a pair known as a key and a value. We list the pairs, and enclose the hash in curly braces.