7
Thu Oct 13 2022 03:15:33 GMT+0000 (Coordinated Universal Time)
Saved by
@Vrushabh_123
function fakeFetch(msg, shouldReject) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (shouldReject) {
reject(`error from server: ${msg}`)
}
resolve(`from server: ${msg}`)
}, 3000)
})
}
content_copyCOPY
Comments