Array.prototype.unshiftintermediateconst arr = ['b']
const len = arr.unshift('a') // β 2 (new length)
arr // β ['a', 'b']unshift() returns the new length of the array after insertion.
The return value of unshift is the new length of the array after insertion β not the modified array itself.
Implement unshiftReturns which returns the value of arr.unshift(val) directly.