1
I made an access to the database and with Axios.get I got the return but I need to store this return in a variable so I can use it further, but when I tried to get it as a result: Promise { : "pending" }, follow the code of what I am trying to do below:
async function obterLocalizacao() {
await axios.get('http://localhost:3333/informacoes')
.then(response => { return response })
.catch(error => console.log(error))
}
console.log(obterLocalizacao());
The question is, how to store the value of Response in another variable to use in the future?