Array.prototype.toSplicedintermediateconst original = [1, 2, 3]
const result = original.toSpliced(0, 1)
original // β [1, 2, 3] (unchanged)
result // β [2, 3]toSpliced() is the immutable version of splice() β it never changes the source array.
Unlike splice, toSpliced never modifies the original array. This makes it safe to use in scenarios where immutability matters.
Implement checkSplicedImmutable which calls toSpliced(0, 1) but returns the original array.