Using: include("file.jl") | Variables

How could the hi variable of second.jl be used in first.jl knowing that an include is made in second.jl over first.jl

Example

first.jl

any = "$(hi)" # hi is undefined
println()

second.jl

hi = "hola" # variable for use in first.jl
include("first.jl")

Did you try it? It looks fine to me.

1 Like

The println() method has no argument so it doesn’t actually show the string stored in any