Get a JSON-object using pure Promises - fetch.then

PHOTO EMBED

Sat Sep 26 2020 14:09:03 GMT+0000 (Coordinated Universal Time)

Saved by @mishka #javascript

fetch(%27https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits%27)
  .then(response => response.json())
  .then(commits => alert(commits[0].author.login));
content_copyCOPY

https://javascript.info/fetch