I have an array of Promise objects where I want to map on and filter the rejected Promises.
Expected output:
const promises = [
failedPromise,
successPromise,
successPromise,
];
const resolvedPromises = promises.map(promise => ???);
The resolvedPromises variable should container the output of the two successPromise promises.
How would I implement such algorithm?