Web features explorer

Array fill()

Widely available since 2019-03-20
Tags: javascript Groups: JavaScript > Collections > Arrays JavaScript > Collections > Typed arrays

The fill() method of arrays and typed arrays sets all or some items of an array to a given a value.

Learning resources on MDN

Browser support