how to use value of global function in js code example
Example: create global variable inside function JavaScript
<script>
function foo() {
window.yourGlobalVariable = ...;
}
</script>
<script>
function foo() {
window.yourGlobalVariable = ...;
}
</script>