.pop() not working in browser cosole, why? [closed]

Solution 1:

pop() is a method found in the Array.prototype and the globalThis is an object

pop method can be called or applied to objects resembling arrays. Objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.