Modify global variable in a function

I want to rename a variable in a function for later use with its new value.

What I was thinking was this:

myVar = ""

function renameVar()
     myVar = "Hello"
end

renameVar()

println(myVar) #What I wanted is for it to show **Hello** here
2 Likes