📌  相关文章
📜  await 仅在异步函数中有效 - Javascript 代码示例

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

代码示例2
// My function
const myfunction = async function(x, y) {
  return [
    x,
    y,
  ];
}

// Start function
const start = async function(a, b) {
  const result = await myfunction('test', 'test');
  
  console.log(result);
}

// Call start
start();