async function checkStatus() {
const data = await fetch();
return data.json();
}
const result = checkStatus() // Promise
How can I make something like await for response from checkStatus() outside of the function. As I understand it isn't possible to make:
const result = await checkStatus()
But how can I make something similar ?