This survey closed on January 1, 2021. View Survey Results »

In its simplest form, a decorator is simply a way of wrapping one piece of code with another — literally “decorating” it.

Returns a single Promise that fulfills when all of the input's promises fulfills.

js
const promises = [promise1, promise2];

Promise.allSettled(promises).then((results) =>
  results.forEach((result) => console.log(result.status)),
);

Load a module asynchronously and dynamically.

js
await import('/modules/my-module.js')