Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. const getData = async apiUrl => {
  2. const response = await fetch(ˋ${apiUrl}ˋ);
  3. const data = await response.json();
  4.  
  5. return data;
  6. };
  7.  
  8. const getDataShort = async apiUrl => await( await fetch(ˋ${apiUrl}ˋ) ).json();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement