Coding task · JavaScript and TypeScript course · Module 4: Asynchronous JavaScript

Practice: Promise.allSettled in Monitoring

Use Promise.allSettled() to check the status of multiple sensors simultaneously. Unlike Promise.all(), allSettled waits for ALL Promises, regardless of whether they were fulfilled or rejected.

Task

Write code using Promise.allSettled to check several sensors in parallel. Analyze the results - which succeeded (fulfilled) and which failed (rejected).