📜  从异步返回的控制台日志 - Javascript 代码示例

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

代码示例1
import axios from 'axios';

async function getItems() {
  const response = await axios.get(SOME_URL);
  console.log('done', response);
  return response;
}

getItems().then(items => console.log('items: ', items))