Answers for "script that creates a new global variable"

3

create global variable inside function JavaScript

<script>
function foo() {
    window.yourGlobalVariable = ...;
}
</script>
Posted by: Guest on July-29-2020
0

declare variable as global

$GLOBALS['a'] = 'localhost';

function body(){

    echo $GLOBALS['a'];
}
Posted by: Guest on June-22-2021

Code answers related to "script that creates a new global variable"

Code answers related to "Javascript"

Browse Popular Code Answers by Language