Avoiding the Pass-by-Reference JavaScript Pitfall in ServiceNow
Import
·
Apr 30, 2020
·
article
In ServiceNow, the case of unintentionally working with a reference to a JavaScript object property instead of the property's value is most encountered in instances where you are iterating through the results of a GlideRecord query. Here is an example of this mistake and an explanation of why it occurs and how to avoid it.
View original source
https://www.servicenow.com/community/developer-articles/avoiding-the-pass-by-reference-javascript-pitfall-in-servicenow/ta-p/2321079