Here is a piece of code that I have written:
fetch(`${URL}${PATH}`)
.then(res => {
const d = res.json();
console.log("The data is: ", d);
return d;
})
When the code runs, it outputs
The data is: Promise { <pending> }
.
What steps should be taken to view the results and make use of them in the next code statement?
Although other answers suggest using a 'then' block to resolve this issue, I am still encountering unresolved results.