pop() {
        const tail = this.tail;
        if (tail === this.head) {
            return undefined;
        }
        const len = this.list.length;
        this.tail = (tail - 1 + len) & this.capacityMask;
        const item = this.list[this.tail];
        this.list[this.tail] = undefined;
        if (this.head < 2 && tail > 10000 && tail <= len >>> 2) {
            this.shrinkArray();
        }
        return item;
    }
/**
     * Remove and return the last item on the list.
     * Returns undefined if the list is empty.
     * @returns {*}
     */
Remove and return the last item on the list.
Returns undefined if the list is empty.
Remove and return the last item on the list . Returns undefined if the list is empty .
pop() {
        const tail = this.tail;
        if (tail === this.head) {
            return undefined;
        }
        const len = this.list.length;
        this.tail = (tail - 1 + len) & this.capacityMask;
        const item = this.list[this.tail];
        this.list[this.tail] = undefined;
        if (this.head < 2 && tail > 10000 && tail <= len >>> 2) {
            this.shrinkArray();
        }
        return item;
    }
pop ( ) { const tail = this . tail ; if ( tail === this . head ) { return undefined ; } const len = this . list . length ; this . tail = ( tail - 1 + len ) & this . capacityMask ; const item = this . list [ this . tail ] ; this . list [ this . tail ] = undefined ; if ( this . head < 2 && tail > 10000 && tail <= len >>> 2 ) { this . shrinkArray ( ) ; } return item ; }
Remove and return the last item on the list.
Remove and return the last item on the list .