Array.prototype.fillbeginnerconst arr = [1, 2, 3, 4, 5]
arr.fill(9, 2) // β [1, 2, 9, 9, 9]
// fills from index 2 to the endPass a start index to fill() to replace only elements from that position onwards.
The second argument to fill() specifies the start index. Elements before that index are left unchanged.
Challenge: Implement fillFrom(arr, val, start) that fills from start to the end of the array with val.
fillFrom([1, 2, 3, 4, 5], 0, 2) // β [1, 2, 0, 0, 0]
fillFrom([1, 2, 3], 9, 1) // β [1, 9, 9]