Using global variables in a function
Asked 07 September, 2021
Viewed 459 times
  • 65
Votes

How can I create or use a global variable in a function?

If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?

21 Answer