Ruby Programming Language
Ruby Hello World!
By Mark Ciotola
First published on August 23, 2019. Last updated on February 15, 2020.
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 encased in quote marks (regular quotes i.e. “, not smart quotes, i.e. ”).
« Getting Started with Ruby | COURSE | Ruby Programming, Pseudocode and Comments »