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

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.

主站蜘蛛池模板: 荃湾区| 宁南县| 铅山县| 锡林郭勒盟| 萨迦县| 云梦县| 光山县| 五指山市| 南城县| 新源县| 来凤县| 大石桥市| 会东县| 黄大仙区| 顺平县| 肇源县| 临洮县| 淮安市| 石阡县| 翁牛特旗| 江华| 松江区| 昌乐县| 大荔县| 吉木萨尔县| 铁力市| 乌兰浩特市| 漳平市| 宁陵县| 合江县| 仁寿县| 留坝县| 沙湾县| 黔西县| 奉化市| 武川县| 长子县| 西乌| 商洛市| 蒙阴县| 柳林县|