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

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.

主站蜘蛛池模板: 临颍县| 抚宁县| 大姚县| 精河县| 岫岩| 宜昌市| 耒阳市| 和田市| 康乐县| 延津县| 襄汾县| 普定县| 海城市| 凤凰县| 额济纳旗| 通道| 齐齐哈尔市| 马公市| 神农架林区| 邢台市| 丰原市| 长泰县| 金沙县| 温宿县| 青海省| 彰武县| 潜山县| 和平县| 兴海县| 琼结县| 读书| 达拉特旗| 安吉县| 乌海市| 卓尼县| 深圳市| 永平县| 蕉岭县| 菏泽市| 霍林郭勒市| 临潭县|