Using variables in Ruby

Imagine that you want to send a letter to a friend across the country. Prior to the days of email you would write the letter and place it inside an envelope. Now, the envelope is not the letter itself, instead, envelopes simply hold the letters and allow them to be carried to their destination. In the same way, variables are like envelopes. They store the following:
- Words (also called strings)
- Integers
- Methods
- Collections
The variables themselves are the storage mechanisms for data in Ruby programs. They allow developers to store information in the code and then retrieve the information later on.
Variable code implementation
Now let's dive into the code. For a basic example, I'm going to store my name in a variable:
name = "Jordan"
If you go to repl.it and run this, you can see my name displayed in the Terminal:

Additionally, a variable can hold more than one value, and in many cases it's called an array (for which we will dedicate an entire section, later in this course)...