shift() {
        let node = this.head;
        this.head = this.head.next;
        this.head.prev = null;
        return node.val;
    }
// shift (pop the head of the list)
shift (pop the head of the list)
shift ( pop the head of the list )
shift() {
        let node = this.head;
        this.head = this.head.next;
        this.head.prev = null;
        return node.val;
    }
shift ( ) { let node = this . head ; this . head = this . head . next ; this . head . prev = null ; return node . val ; }
shift (pop the head of the list)
shift ( pop the head of the list )