return boolean value from method : Boolean variable « Language Basics « Ruby






return boolean value from method


def lookup(val)
    puts "Looking up #{val}"
    return true
end

false && lookup("cat") 

 








Related examples in the same category

1.Booleans