Data types represent different types of data such as numbers, booleans, strings, etc. As an object-oriented language, all data types are based on classes.
Ruby has different types of numbers such as integers and floating point numbers.
A value of either
A string is a sequence of characters that represents a word or a sentence. They are created by surrounding a sequence of characters with single or double quotes.
Arrays store data in a list. An array can contain any type of data. Values are comma separated and enclosed in square brackets. Positions in the array start at 0.
A collection of key-value pairs enclosed within curly braces. Values are assigned to keys using the
Symbols are a unique data type in Ruby. They are similar to strings except that they take up less memory and have better performance. Symbols are created by using the