Red sleeves add fragrance, peerless enchanting, Ruby 3 basic grammar of Ruby language basic introductory tutorial, first intimate contact with EP01

Original link: https://v3u.cn/a_id_256

20221006161005_75484.png

Continuing from the last book, in the previous article, we have built a development environment for Ruby3 on all platforms. Now, we can get in touch with Ruby3 for the first time. Ruby is an interpreted programming language that is versatile at the object-oriented level. We can think of writing Ruby code as a behavioral art. Coding is like dancing. Every step in Ruby is elegant and almost no step is superfluous. Enter the first line of code into the irb terminal of the system and enter the first line of code: irb(main):001:0>puts “Hello Ruby!” Hello Ruby!=>nilputs The keyword is the basic word used for printing in the Ruby language Order. What is the nil output on the third line? In fact, it is the return value of the puts command. The puts command always returns nil, and nil is also Ruby…

This article is reprinted from: https://v3u.cn/a_id_256
This site is for inclusion only, and the copyright belongs to the original author.