var x;      # declared, but not defined
x == nil   && say "nil value";
defined(x) || say "undefined";
 
# Give "x" some value
x = 42;
 
defined(x) && say "defined";
 
# Change "x" back to `nil`
x = nil;
 
defined(x) || say "undefined";