Array.prototype.unshiftintermediateconst arr = ['b', 'c']
arr.unshift('a')
console.log(arr) // β ['a', 'b', 'c'] (mutated)unshift() mutates the original array β use toSpliced(0, 0, el) for an immutable alternative.
unshift modifies the original array in place. After calling it, the prepended value becomes arr[0].
Implement prependAndCheck which unshifts val and returns arr[0] to confirm it is now the first element.