Please see this topic for the explanation of this behaviour:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Global.get in a function changes the global variable | 10 | 240 | 13 December 2023 | |
| Why is the global variable changing? | 6 | 82 | 20 September 2024 | |
| Global.put not needed as variable altered by reference? | 8 | 776 | 18 January 2020 | |
| Don't really understand the behavior of a global variable | 8 | 116 | 26 October 2024 | |
| Is global.set(var,value) required? | 4 | 538 | 22 July 2020 |