Array.prototype.popbeginnerconst arr = []
arr.pop() // β undefined (empty array)pop() returns undefined when called on an empty array β guard against this if needed.
Calling pop() on an empty array does nothing and returns undefined. The array remains empty and no error is thrown.
Challenge: Implement popEmpty() that calls pop() on an empty array and returns the result.
popEmpty() // β undefined