Promise.allSettled()
Returns a single Promise that fulfills when all of the input's promises fulfills.
const promises = [promise1, promise2]; Promise.allSettled(promises).then((results) => results.forEach((result) => console.log(result.status)), );
Load a module asynchronously and dynamically.
await import('/modules/my-module.js')