« first day (2964 days earlier)      last day (1138 days later) » 

 
3 hours later…
 
14 hours later…
 
2 hours later…
9:40 PM
```javascript
console.log(getData());
```
to this:
```javascript
const myResult = await getData();
console.log(myResult);
```
Now I get a `SyntaxError: await is only valid in async function`.
This is the function:
```javascript
const fetch = require('node-fetch');

async function getData() {
const responseJSON = await fetch('https://xxx.glitch.me/xxx/xxx');
return await responseJSON['username'];
}
```
 
1 message moved from JavaScript
 
 
2 hours later…

« first day (2964 days earlier)      last day (1138 days later) »