Hi,
I'll use your example to provide a generic answer on how to get help.
This has been discussed multiple times in the group; however, as there are no more pinned subjects, it is now hidden in the 6k+ past subjects.
The first step is to identify the scope of your issue.
In your case, as there are no app.* involved, this appears to be a generic JavaScript issue.
This means that the answer is probably available on the internet.
Your issue is due to the fact that when you assign an object to a variable, the variable contains a reference to the said object (and not the object itself).
There is some interesting information about this on the official MDN documentation:
You can find it in the "Comparing objects" section at the very bottom.
When you're not familiar with the subject and don't know where to search, it's okay to ask on online platforms.
Identifying the right platform maximizes your chances of getting fast and effective help.
This forum deals mostly with DroidScript related subjects/issues.
This means that posts won't get huge visibility (as the DS community is not a huge community) and subjects outside of DroidScript scopes could easily get ignored (especially when the answer seems to be available on the net).
That's why, in this scenario, it would be more efficient to ask on more generic and widely-used platforms like Quora, Reddit, Stack Overflow, etc.
Or even better, if you're able to narrow down your issue and explain it clearly, you can use ChatGPT for this (even the free version).
I did it for your question, and the answer was instantaneous and really impressive.
I'll join the prompt and the output to this message to illustrate it.
And of course, if your subject is directly related to DroidScript, you're welcome to search for help in the DroidScript community.