Skip to content

Commit

Permalink
Update promises.js
Browse files Browse the repository at this point in the history
  • Loading branch information
githubAmanKumar authored Mar 16, 2024
1 parent ea54bea commit 6467458
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion 09_advance_one/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,26 @@ async function consumePromiseFive() {
console.log(error);
}
}
consumePromiseFive()
consumePromiseFive()


// async function getAllUsers() {
// try {
// const response = fetch('https://jsonplaceholder.typicode.com/users')
// const data = await response.json();
// console.log(data);
// } catch (error) {
// console.log("E:", error);
// }
// }

// getAllUsers()

fetch('https://api.github.com/users/githuAmankumar')
.then((res)=>{
return res.json();
})
.then((res)=>{
console.log(res);
})
.catch((error)=> console.log(error))

0 comments on commit 6467458

Please sign in to comment.