Skip to content

Instantly share code, notes, and snippets.

@kmsheng
Created June 9, 2017 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmsheng/b005fe2c18db51e42144f388dcaac3a7 to your computer and use it in GitHub Desktop.
Save kmsheng/b005fe2c18db51e42144f388dcaac3a7 to your computer and use it in GitHub Desktop.
const URL = 'https://api.dharma-treasure.org/kdbs/jiangkangyur/pbs/1-1-1b';
let result = '';
fetch(URL).then((res) => res.json())
.then((json) => {
result = json;
console.log('inside', result);
});
console.log('outside', result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment