You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can only await for an actual result from a promise within an async function, while the async function itself will always return a promise. For example:
constdemo=async()=>{constresponse=awaitAxios.get("http://example.com")//"response" will contain the actual JS object}constp=demo()// "p" will contain a pending promise, NOT the actual data
The text was updated successfully, but these errors were encountered:
We can only await for an actual result from a promise within an async function, while the async function itself will always return a promise. For example:
The text was updated successfully, but these errors were encountered: