Skip to content

Commit 6467458

Browse files
Update promises.js
1 parent ea54bea commit 6467458

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

09_advance_one/promises.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,26 @@ async function consumePromiseFive() {
7373
console.log(error);
7474
}
7575
}
76-
consumePromiseFive()
76+
consumePromiseFive()
77+
78+
79+
// async function getAllUsers() {
80+
// try {
81+
// const response = fetch('https://jsonplaceholder.typicode.com/users')
82+
// const data = await response.json();
83+
// console.log(data);
84+
// } catch (error) {
85+
// console.log("E:", error);
86+
// }
87+
// }
88+
89+
// getAllUsers()
90+
91+
fetch('https://api.github.com/users/githuAmankumar')
92+
.then((res)=>{
93+
return res.json();
94+
})
95+
.then((res)=>{
96+
console.log(res);
97+
})
98+
.catch((error)=> console.log(error))

0 commit comments

Comments
 (0)