How to correctly define and use global variables in the module in Julia?

Thank you very much!
Just one more thing, about global variable.
If I define global variables inside each function, and now if I have 10 global variables and each of them are defined inside the functions.

function f1 (x)
global a1 = x^2
return nothing
end

function f2 (x)
global a2 = x^3
return nothing
end

function f3 (x)
global a3 = x^4
return nothing
end

function f10 (x)
global a10 = x^11
return nothing
end

Now you see all the a1, a2, … a10 are defined inside each functions.

Now, it seems if I forgot some variables are global, I may make some mistakes, right?

Is it better just to clearly define all the global variable in the beginning so that it is easier to remember which are global variables?

  global const a1 = Ref{Float64}()
  global const a2 = Ref{Float64}()
 ...

 function f1  ... end
 function f2 ... end
....