Answer Posted / Nitin Kumar Verma
In Ruby, 'nil' is an object that represents the absence of any value or object, while 'false' is a boolean value representing falsehood. While 'nil' evaluates to false in boolean contexts, it takes up memory space. On the other hand, 'false' does not consume memory and is preferred for boolean values.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers