How do I create a global variable in Harmony 12

I want to create a variable in a scope that is greater than the functions. On Harmony 10 I could define a variable outside of the function and it was done, but in Harmony 12 I’m not able to do that… is that right? If it is, how do I manage to keep information between functions?

Example:

var MyVar = 1

function FuncA(){
MessageBox.information(MyVar)
MyVar = 2
}

In this example, the first time I call the FuncA the message box should say 1, and the second time it should say 2… but that don’t seem to be true on Harmony 12. Is that another way to do it?

Thanks,
Diego Stoliar.