last(n = 1) {
            if (n < 1) {
                throw `You must query with a positive nonzero integer. Please use a
               different value for n.`;
            }
            if (this.trials.length === 0)
                return new DataCollection();
            if (n > this.trials.length)
                n = this.trials.length;
            return new DataCollection(this.trials.slice(this.trials.length - n, this.trials.length));
        }
/**
         * Queries the last n elements in a collection of trials.
         *
         * @param n A positive integer of elements to return. A value of
         *          n that is less than 1 will throw an error.
         *
         * @return Last n objects of a collection of trials. If fewer than
         *         n trials are available, the trials.length elements will
         *         be returned.
         *
         */
Queries the last n elements in a collection of trials.

@param n A positive integer of elements to return. A value of
n that is less than 1 will throw an error.

@return Last n objects of a collection of trials. If fewer than
n trials are available, the trials.length elements will
be returned.
Queries the last n elements in a collection of trials . @param n A positive integer of elements to return . A value of n that is less than 1 will throw an error . @return Last n objects of a collection of trials . If fewer than n trials are available the trials . length elements will be returned .
last(n = 1) {
            if (n < 1) {
                throw `You must query with a positive nonzero integer. Please use a
               different value for n.`;
            }
            if (this.trials.length === 0)
                return new DataCollection();
            if (n > this.trials.length)
                n = this.trials.length;
            return new DataCollection(this.trials.slice(this.trials.length - n, this.trials.length));
        }
last ( n = 1 ) { if ( n < 1 ) { throw ` ` ; } if ( this . trials . length === 0 ) return new DataCollection ( ) ; if ( n > this . trials . length ) n = this . trials . length ; return new DataCollection ( this . trials . slice ( this . trials . length - n , this . trials . length ) ) ; }
Queries the last n elements in a collection of trials.
Queries the last n elements in a collection of trials .