← Back to release summary

Array.fromAsync

Category
JavaScript
Type
Chromium catches up
Status
Enabled by default (Chrome 121)
Intent stage
Dev trials

Summary

Array.fromAsync is the async version of Array.from. It takes async iterables, iterates them, and collects the results into an array.

Motivation

Array.from is popular and only works for synchronous iterables. This fills the gap for asynchronous iterables.

Standards & signals

Explainers: https://github.com/tc39/proposal-array-from-async

View on chromestatus.com