Last active
October 2, 2020 12:38
-
-
Save nsacerdote/0956a0b338d0dd1b82a3d6c3c26fc4bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSomething() { | |
return new Promise((resolve, reject) => { | |
fetch('http://example.com/movies.json') | |
.then(response => resolve(response.json())) | |
.catch(err => reject(err)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment