官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 玉田县| 屏山县| 右玉县| 曲麻莱县| 嘉义市| 罗定市| 乌拉特后旗| 昌平区| 东乌| 台南县| 微博| 鄂温| 蒲江县| 新晃| 肇源县| 隆子县| 墨脱县| 那曲县| 中宁县| 焦作市| 邻水| 金湖县| 黄山市| 团风县| 醴陵市| 宝应县| 司法| 桐城市| 玉门市| 宁乡县| 饶平县| 光泽县| 南江县| 玛沁县| 西乡县| 广宗县| 卢湾区| 密云县| 宽城| 克拉玛依市| 邯郸县|