how to create a javascript valiable that can be accessed from anywhere in the script code example
Example: create global variable inside function JavaScript
<script>
function foo() {
window.yourGlobalVariable = ...;
}
</script>
<script>
function foo() {
window.yourGlobalVariable = ...;
}
</script>