Everything in Ruby is an object and has specific built-in abilities knows as “methods”.
For eg strings have built-in methods that can tell you the length of the string, reverse it, capitalize it and much more.
It returns the length of the string.
Ruby will output =>> 6
This method reverse the string that we provide.
Ruby will output => ahseyA
.upcase & .downcase
These two methods can be used to change the case of a string.
As the name suggests, .upcase would change the entire string to uppercase and .downcase would change the entire string to the lower case.
puts “Ayesha”.downcase would give output =>> ayesha
puts “Ayesha”.upcase would give output =>> AYESHA