📜  异步等待 - Javascript 代码示例

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

代码示例6
async function () {
  const fetchAPI = fetch(`https://bn-hadith-api.herokuapp.com/hadiths/0`);
  const response = await fetchAPI;
  const data = await response.json();
  console.log(data);
}