Answer Posted / Jha Nileshkumar Kripanath
The defined operator in Ruby checks whether a method or variable has been initialized. It returns three values: nil (if the variable is undefined), 'nil' (if the variable is defined but empty), and the name of the variable or method (if it is defined and not empty).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers