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

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.

主站蜘蛛池模板: 广东省| 沈阳市| 右玉县| 鹿泉市| 钟祥市| 萝北县| 凤庆县| 沂水县| 交口县| 瓮安县| 繁昌县| 贺州市| 云和县| 东光县| 丹棱县| 襄城县| 外汇| 瑞安市| 日喀则市| 梨树县| 同江市| 杂多县| 西丰县| 葫芦岛市| 琼结县| 阿坝县| 浮梁县| 汤原县| 平安县| 闵行区| 长岭县| 通榆县| 鄂温| 和田县| 昭平县| 肃北| 玛沁县| 蒙阴县| 阿勒泰市| 微山县| 屏南县|