Retroactive/lib/data_structures/double_linked_list.js
function(start, end){
        //subQueue to Array
        if(start >= 0 && start < end && end <= this._length) {
            var result = [],
                current = this._head,
                i = 0;
            while(i++ < start) {
                current = current.next;
            }

            while(start++ < end) {
                var value = current.data.value;
                if(value != null) {
                    result.push(current.data.value);
                }
                current = current.next;
            }

            return result;
        }

        var result = [],
            current = this._head;
        
        while(current){
            result.push(current.data);
            current = current.next;
        }
        
        return result;
    }
function(start, end){
        //subQueue to Array
        if(start >= 0 && start < end && end <= this._length) {
            var result = [],
                current = this._head,
                i = 0;
            while(i++ < start) {
                current = current.next;
            }

            while(start++ < end) {
                var value = current.data.value;
                if(value != null) {
                    result.push(current.data.value);
                }
                current = current.next;
            }

            return result;
        }

        var result = [],
            current = this._head;
        
        while(current){
            result.push(current.data);
            current = current.next;
        }
        
        return result;
    }
function ( start , end ) { //subQueue to Array if ( start >= 0 && start < end && end <= this . _length ) { var result = [ ] , current = this . _head , i = 0 ; while ( i ++ < start ) { current = current . next ; } while ( start ++ < end ) { var value = current . data . value ; if ( value != null ) { result . push ( current . data . value ) ; } current = current . next ; } return result ; } var result = [ ] , current = this . _head ; while ( current ) { result . push ( current . data ) ; current = current . next ; } return result ; }
Converts the list into an array.
@return {Array} An array containing all of the data in the list.
@method toArray
Converts the list into an array .