Question:

What does the following expression evaluate to?

"i am not shouting".upcase()

Answer:

"I AM NOT SHOUTING"

This shows that Ruby has nifty methods that are built in to the String class. The syntax for using the built in methods is the value, followed by dot, followed by the method name.


Keywords:

© 2017 QuizBucket.org