Is it possible to get variable from executeScript_Sandbox without using return statement?

Hello, I’ve been trying to get the js variable into a global variable without using return statement.

Here’s the thing. I’m using async on javascript with fetch (sending HTTP requests) since it’s asynchronous the return statement won’t return the actual thing because it basically runs the return statement while still getting the HTTP response.

So I tried using the return statement inside the async brackets to run the request first then use the return statement afterwards but it just doesn’t work inside a bracket, same goes with functions, anything inside the bracket return statement won’t work. I’m asking if there’s any alternatives on it, Thanks!

Hi, can you please post a short test macro with your async code?