Hello everybody,
Facing the challenge “Visualize Data with a Bar Chart” of the curriculum I tried to retrieve the data with the fetch and with the json method of d3, with the latter you do not receive an answer and with fetch the request remains pending but with a fulfilled status, can you tell me why and how to solve it?
It does not make sense (from a JS runtime perspective) to call await outside of an async function. So, you need to have any await within an async function…
This is why libraries like d3 and jQuery come with methods like onReady, and wrap all of the logic.
Hint for what to do:
You need to wrap all of your data fetching/using logic within an async function