Explain the difference between nil and false in ruby.The differences of the methods nil and false are:
- nil cannot be a value, where as a false can be a value
- A method returns true or false in case of a predicate, other wise nil is returned.
- false is a boolean data type, where as nil is not.
- nil is an object for NilClass, where as false is an object of for FalseClass
Explain the difference between nil and false in ruby. False is a boolean datatype
Nil is not a data type