1const username = "elijahjcobb";
2fetch(`https://api.github.com/users/${username}`)
3 .then(res => res.json())
4 .then(gist => {
5 const {name, company, location} = gist;
6 console.log(`${name} works at ${company} in ${location}.`);
7 });
1const id = "<the-gist-id>";
2fetch(`https://api.github.com/gists/${id}`)
3 .then(res => res.json())
4 .then(gist => {
5 const {createdAt, description} = gist;
6 console.log(`The ${description} gist was created at ${createdAt}!`);
7 });