📅  最后修改于: 2022-03-11 15:01:36.455000             🧑  作者: Mango
const fetchData = async () => {
try {
const res = await fetch("js/data.json");
data = await res.json();
displayData(data);
} catch (e) {
console.log("something went wrong!", e);
}
};
fetchData();