0

I'm working on a new library, and I am trying to make a function: toGlobal(variable), it will take any variable, local, or global, and make it a global variable. The only problem is that I can't find a method to make a local variable become global.

Travis
  • 1,274
  • 1
  • 16
  • 33
  • 1
    Sounds like a solution to a problem that doesn't exist. Why do you think you need to do this? – John3136 Feb 02 '15 at 04:11
  • 1
    assign it to window, i.e `window.variable` – David Feb 02 '15 at 04:11
  • @John3136 I have had the problem with occasionally needing a local variable to become global, and it's needed for undisclosed sections of the library itself. –  Feb 02 '15 at 04:14
  • Thanks Felix for pointing me to the correct question. –  Feb 02 '15 at 04:20

0 Answers0