Global variables in function code example
Example 1: javascript define global variable
window.myGlobalVariable = "I am totally a global Var"; //define a global variable
var myOtherGlobalVariable="I too am global as long as I'm outside a function";
Example 2: How to define global variables
Use pm.globals to define a global variable:
pm.globals.set("variable_key", "variable_value");