为什么我得到承诺{<pending>}?有人可以解释我吗

时间:2020-10-08 09:32:18

标签: javascript promise fetch-api

const API_KEY = 'xxxxxxxxx';

const getData = fetch(`https://quizapi.io/api/v1/questions?apiKey=${ API_KEY }`)
                .then(res => res.json())
                .then(data => data)

console.log(getData);

0 个答案:

没有答案