I have a JavaScript function to generate a variable. That function is activated by an onclick button event.
After that variable is generated, I need to use it as a global variable so that other JavaScript processes can use that variable.
How do I do it?