async function getQuote() {
console.log("heya");
const url = "/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1";
const response = await fetch(url);
console.log(response);
return await response.json();
// console.log("hello", quote);
}
getQuote().then(result => {
console.log("here");
console.log(result.shift());
});
这是我的代码。为什么没有回复的东西? 链接:https://codepen.io/anon/pen/JJYGNJ?editors=1012