Why output from code below is Promise {<pending>}
instead of Response
.
What I doing wrong? Also await fetch("https://...")
not working.
function asynchronousFunction() {
return fetch("https://thatcopy.pw/catapi/rest/")
}
const mainFunction = async () => {
const result = await asynchronousFunction()
return result;
}
console.log(mainFunction())