Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
245 B
2
Indexable
Never
var newVar = null;
async function getData() {
  await fetch('http://localhost:8085/api/v1/movies?page=1&limit=20')
    .then(response => response.json())
    .then(data => {
      newVar = data
    })
}

getData().then(()=>{console.log(newVar)})