what is a global variable
Global variables allow you to access data between collections,
requests, test scripts, and environments. Global variables
are available throughout a workspace. I use Global variables
to quickly test something.
3.71
7
$GLOBALS['a'] = 'localhost';
function body(){
echo $GLOBALS['a'];
}
Thank you!
7
0
4
1
Use pm.globals to define a global variable:
pm.globals.set("variable_key", "variable_value");
Thank you!
1
0
3.4
8
x = "awesome"
def myfunc():
print("Python is " + x)
myfunc()
Thank you!
8
0
3.5
2
function foo() {
var variable1, variable2;
variable1 = 5;
varaible2 = 6;
return variable1 + variable2;
}
Thank you!
2
0
Are there any code examples left?
New code examples in category Other