so far, Ruby seems to handle datatypes in a very smooth way. what I mean by that is that unlike other languages like C++ where the datatype has to be declared prior to even thinking about initializing it, Ruby knows what datatype to assign a variable from the variable's content itself. like for example if we were to declare a variable x like this:
x = "Hello World!"
Ruby would automatically assign the variable x the datatype of String
- Now, Ruby has many datatypes of which we can mention the following: