Ruby is an open source server-side scripting language for object-oriented programming. It was designed and developed by Yukihiro Matsumoto in Japan in the mid-1990s. In the Ruby community, Matsumoto is also known as Matz. Ruby runs on multiple platforms such as Windows, MAC OS, and various versions of UNIX.

Ruby data types syntax

The data types supported by Ruby include basic Number, String, Ranges, Symbols, and special values ​​of true, false, and nil, as well as two important data structures-Array and Hash.

Ruby data types example

123.4             # Floating point value
1.0e6            # Scientific notation
4E20             # Not required
4e+20           # The symbol before the exponent
#Floating point type f1=0.0 f2=2.1 f3=1000000.1 puts f3