Data Types in Ruby

Learn about the different data types in Ruby.

Data types

In the previous chapters, we figured out how to join two strings with "+". Also, we know now that we can multiply a string by a number. While experimenting, we found that there are at least two types of data: strings and numbers, also known as integers. We also learned that a number itself, written in quotation marks, is a string. Let’s see how Ruby understands what a number and what a string is:

Get hands-on with 1200+ tech skills courses.