JSFiddle - React, Tailwind, and code Playground
JavaScript 1.7
async function executar(){
return $.ajax({
'url': 'https://swapi.co/api/people/1',
'metod': 'GET',
success: async function(data){
return data
}
})
}
async function chamaFuncao(){
await executar()
.then((res) =>{
alert(res.name)
})
alert('Continua a execução')
}
chamaFuncao();