-
@DanShappir @jaffathecake Yeah I was batching a bunch of promises and used the new Promise() to encapsulate some variables. const ps = [ new Promise( () => { const x = 'a'; return doWork(x); }), new Promise( () => { const x = 'b'; return doWork(x); }), ]; Promise.all( ps);
-
@DanShappir @jaffathecake (in the example above, doWork is a promise/async) That way I didn't need to have unique names for every 'x' variable, kept the code readable.