How do I check if variable is defined in the current workspace? (not using the macro)

julia> x_sym = :x
:x

julia> isdefined(Main, x_sym)
false

julia> x = 1
1

julia> isdefined(Main, x_sym)
true
4 Likes