First of all, it outputs Hello world.
Hello world.
Make sure that the output result changes depending on the characters you typed.
> ruby hello_name.rb Rudy
Hello Rudy.
You can output using puts.
puts "Hello world"
Click here for the incidental part.
puts "Hello #{ARGV[0]}."
note
There are several ways to output with ruby. ・ Print: Output normally, line breaks required ・ Puts: Output normally: Line breaks automatically ・ P: When launching as debugging work during coding ・ Pp: p pretty print ・ Printf: Same as c language
Recommended Posts