Run function while async function is pending
I want to learn how can I run a function while part of my code is still running, like an async function or some loop that can take some time to finish.
For example, while fetching data from an API, I want it to display a loading animation or message while the async function is pending
For example, while fetching data from an API, I want it to display a loading animation or message while the async function is pending
