console log return from async

Solutions on MaxInterview for console log return from async by the best coders in the world

showing results for - "console log return from async"
Emilie
06 Oct 2017
1import axios from 'axios';
2
3async function getItems() {
4  const response = await axios.get(SOME_URL);
5  console.log('done', response);
6  return response;
7}
8
9getItems().then(items => console.log('items: ', items))