DEV Community

Discussion on: "Synchronous" fetch with async/await

Collapse
 
spine001 profile image
spine001

You can pass an objetc to the function, and then take care to only change the content of the object without making a copy of it, then what is passed is the address of the object. And when you modify it with methods of the object that don't make copies, you will be modifying the object itself outside the scope of the function.
I imagine that you already solved this but since I haven't seen anybody ever give you an answer I am posting this to help others with the same problem.