Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async await anonymous function

let x = await (async function() {return "hello"})();
console.log(x);
// or
console.log(await (async() => 'hello')())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #async #await #anonymous #function
ADD COMMENT
Topic
Name
2+2 =