Array.prototype.copyWithinadvancedconst arr = [1, 2, 3, 4, 5]
arr.copyWithin(1, 3, 5) // β [1, 4, 5, 4, 5]
// copies slice [3,5) to position 1Provide start and end arguments to copyWithin() to copy only a specific slice.
With all three parameters (target, start, end), you can copy any slice of an array to any position within itself.
Challenge: Implement copyRange(arr, target, start, end) that wraps arr.copyWithin(target, start, end).
copyRange([1, 2, 3, 4, 5], 0, 3, 5) // β [4, 5, 3, 4, 5]
copyRange([1, 2, 3, 4, 5], 1, 3) // β [1, 4, 5, 4, 5]