Answers for "how to check existence of variable in ruby"

1

ruby check if exists

apple = 1

defined?(apple)
# "local-variable"

defined?(bacon)
# nil
Posted by: Guest on June-01-2020

Code answers related to "how to check existence of variable in ruby"

Browse Popular Code Answers by Language