A new array with the element at index replaced, every other index is read from theArray so an
empty slot of a sparse array is undefined in the new array
Since
0.14.0
Throws
RangeError if the index is out of bounds (so a value without a length, eg. a number, always throws), or the
length is longer than an array can be (2^32 - 1), like the native function
Polyfill implementation of Array.with() for environments that don't support it.