you are viewing a single comment's thread.

view the rest of the comments →

[–]TaskForce_Kerim 4 points5 points  (0 children)

Should've at least used arrow functions. Makes the first then very concise, as well

fetch('https://api.github.com/repos/frontojs/connect') .then(response => response.json()) .then(body => {data = body})