I have a function that receives an array of objects and is responsible for removing certain objects based on specific criteria.
The issue I'm facing is that the original array is not being updated as expected due to scope handling problems.
In this particular function, the return value is already utilized and cannot be modified. Is there a way for me to update the array in this scenario?