I have a function with no input parameters, that uses a script variable.
From my understanding with other programming languages, function should only have access to variables passed to or defined in the function.
When I run the script below it returns 14. Why does this work? Is there a way to make the variables used by the function more exclusive?
scriptVar = 14;
myFunction = function({},{default local},
functionVar = scriptVar;
return(functionVar);
);
returnVar = myFunction();Thanks for your help.