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

Method chaining

Another neat thing we can do is join different methods together to get a custom output. For example, I can run this:

"Astros".reverse.upcase 

The preceding code displays the SORTSA value.

This practice of combining different methods with a dot is called method chaining.

主站蜘蛛池模板: 化隆| 宝兴县| 大荔县| 广东省| 永靖县| 安庆市| 信宜市| 会昌县| 景宁| 喀喇沁旗| 婺源县| 陇西县| 金坛市| 丹阳市| 无极县| 喀喇沁旗| 新邵县| 察雅县| 康乐县| 胶州市| 荥阳市| 垫江县| 内黄县| 汶上县| 桦川县| 阿克苏市| 汨罗市| 平陆县| 抚顺市| 枣强县| 隆林| 德令哈市| 江津市| 崇礼县| 绥宁县| 中卫市| 临澧县| 徐水县| 寿光市| 山丹县| 天津市|