This is my fetch function:
getAllCountries = async () => {
try {
const response = await fetch("https://restcountries.eu/rest/v2/all");
const result = response.json();
console.log(result);
this.countriesList = result;
} catch (error) {
console.log(error);
}
};
Why is there two promise logged in there, and how do I access the PromiseResult.
I tried console.log(result[0])
but did not work