Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js promise API

const fetchData = () => {
  fetch('https://api.github.com').then(resp => {
    resp.json().then(data => {
      console.log(data);
    });
  });
};
Source by jscomplete.com #
 
PREVIOUS NEXT
Tagged: #js #promise #API
ADD COMMENT
Topic
Name
8+7 =