Ruby Data Types
There are various numbers of data types in Ruby. Data types are classification that are used to identify operations. Ruby data types are very similar to that of Phython, with simple and little changes. The different types that can be used are:
1. string= Strings are words. Every string must contain quotation marks around it.
Example of string: “Avocado”
2. integer= Integers are basicly numbers.
Example of integer: 96
3. float= To make it simple, float is an integer with a decimal point
Example of float: 96.00
4. array= Arrays are lists of items. Arrays must include []
Example of array: [1,2,3,4]
5. boolean= True or False Statements
Example of boolean: true
6. hash= Dictionary, used to assign values to items.
Example of hash: {back=>hi, front=> bye}