What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-01 07:46:02
asynchronous function using function constructor
const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor; // assume someAsyncCall is a call to another async func we await for that returns 1 (just make this simpler) const func = new AsyncFunction('arg1', 'arg2', 'return arg1 * arg2 * ... Add solution