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

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.

主站蜘蛛池模板: 左权县| 密山市| 晋中市| 沙河市| 韶关市| 谷城县| 墨脱县| 贡觉县| 屯留县| 高碑店市| 衢州市| 长汀县| 建德市| 饶阳县| 巴南区| 井陉县| 五华县| 和龙市| 南和县| 讷河市| 灵山县| 新宾| 明光市| 渭南市| 长汀县| 荔波县| 合肥市| 弥勒县| 泗洪县| 蒙自县| 汉中市| 犍为县| 元阳县| 资中县| 阳朔县| 延安市| 四川省| 太保市| 右玉县| 本溪| 玉树县|