fill method

JsArray<E> fill(
  1. E value, [
  2. int? start,
  3. int? end
])

The fill() method is a mutating method. It does not alter the length of this, but it will change the content of this.

The fill() method fills empty slots in sparse arrays with value as well.

The fill() method is generic. It only expects the this value to have a length property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.

Implementation

JsArray<E> fill(E value, [int? start, int? end]) =>
    jsu.callMethod(this, 'fill', [value, start, end]);