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

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.

主站蜘蛛池模板: 普宁市| 凤山市| 台北县| 前郭尔| 江津市| 青浦区| 淳化县| 宁都县| 封开县| 榆社县| 竹山县| 中宁县| 隆林| 济阳县| 简阳市| 庄河市| 通山县| 陇西县| 宿州市| 宾阳县| 罗甸县| 阜新市| 高尔夫| 宣武区| 临夏县| 山阳县| 丹凤县| 宝坻区| 历史| 讷河市| 凌海市| 石泉县| 喜德县| 大英县| 宿松县| 肃宁县| 吉木萨尔县| 德清县| 扎鲁特旗| 永昌县| 邵武市|