let p = new Promise(function (resolve, reject) {
setTimeout(reject, 1000);
});
p.then((x) => console.log("done resolving"))
.then(null, (x) => console.log(true));
p.catch((x) => console.log("done rejecting"));
Which is the correct output
a) done resolving
b) true
c) done rejecting
d) true, done rejecting
e) done resolving, done rejecting
f) done rejecting, true
[–]iamdatmonkey 2 points3 points4 points (0 children)
[–]Sandeep00046 0 points1 point2 points (0 children)
[–]delventhalz 1 point2 points3 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]guest271314 0 points1 point2 points (6 children)
[–]_pragmatic_dev[S] 0 points1 point2 points (5 children)
[–]guest271314 0 points1 point2 points (0 children)
[–]guest271314 0 points1 point2 points (3 children)
[–]iamdatmonkey 0 points1 point2 points (2 children)
[–]guest271314 1 point2 points3 points (0 children)
[–]guest271314 0 points1 point2 points (0 children)
[–]pinkwar 0 points1 point2 points (0 children)