Advertisement
Guest User

example2

a guest
Mar 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;const userController = (function () {
  2.  
  3.     const fetchViruses = () => {
  4.                 fetch('/viruses')
  5.                     .then((response) => response.json())
  6.                     .then((json) => {
  7.                         .....
  8.                     });
  9.  
  10.     const fetchCapitals = () => {
  11.                 fetch('/cities')
  12.                     .then((response) => response.json())
  13.                     .then((json) => {
  14.                         .....
  15.                     });
  16.             };
  17.  
  18.     return {
  19.         fetchViruses,
  20.         fetchCapitals
  21.     }
  22. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement