The documentation on MDN indicates that the syntax for Array.prototype.fill is:
Array.prototype.fill(value[, start[, end]])
The example
console.log([1, 2, 3].fill(4, 1, 1)); // [1, 2, 3]
in the documentation and my testing agrees with the commented answer.
However, I can’t see how that can be right. The parameters indicate that indexes 1 through 1 should be filled with 4. Index 1 has the value of 2, so I should have though that the result should be [1,4,3].
What is the correct interpretation of the parameters start and end?
the empty stringstring?