Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the given code?
“I’am learning Ruby Language”.length.reverse.upcase

What will be the output of the given code?
“I’am learning Ruby Language”.length.reverse.upcase
a) 27
b) egaugnal ybuR gninreal ma’I
c) ERAUGNAL YBUR GNINREAL MA’I
d) Undefined method `reverse’ for 27:Fixnum

Answer: d
Explanation: The .length method finds the length which is a number and can’t be reversed.
Output: undefined method `reverse’ for 27:Fixnum

Join The Discussion