Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;const userController = (function () {
- const fetchViruses = () => {
- fetch('/viruses')
- .then((response) => response.json())
- .then((json) => {
- .....
- });
- const fetchCapitals = () => {
- fetch('/cities')
- .then((response) => response.json())
- .then((json) => {
- .....
- });
- };
- return {
- fetchViruses,
- fetchCapitals
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement