📜  异步等待匿名函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:19.656000             🧑  作者: Mango

代码示例1
let x = await (async function() {return "hello"})();
console.log(x);
// or
console.log(await (async() => 'hello')())