Ruby Hello World!

A traditional introduction to any programing language is to show how it would output the phrase Hello World!” In Ruby, a hello world program comprises merely one line:

puts ”Hello World!”

Which would output to a terminal window:

Hello World!

The word “puts” tells Ruby to print whatever is contained to the right of the word to the terminal screen. Since “Hello World!” is a string (text characters), it must be incased in quotes.