static/ext/src/lang/Array.js
function(iterable, start, end){
            if (!iterable || !iterable.length) {
                return [];
            }

            if (typeof iterable === 'string') {
                iterable = iterable.split('');
            }

            if (supportsSliceOnNodeList) {
                return slice.call(iterable, start || 0, end || iterable.length);
            }

            var array = [],
                i;

            start = start || 0;
            end = end ? ((end < 0) ? iterable.length + end : end) : iterable.length;

            for (i = start; i < end; i++) {
                array.push(iterable[i]);
            }

            return array;
        }
function(iterable, start, end){
            if (!iterable || !iterable.length) {
                return [];
            }

            if (typeof iterable === 'string') {
                iterable = iterable.split('');
            }

            if (supportsSliceOnNodeList) {
                return slice.call(iterable, start || 0, end || iterable.length);
            }

            var array = [],
                i;

            start = start || 0;
            end = end ? ((end < 0) ? iterable.length + end : end) : iterable.length;

            for (i = start; i < end; i++) {
                array.push(iterable[i]);
            }

            return array;
        }
function ( iterable , start , end ) { if ( ! iterable || ! iterable . length ) { return [ ] ; } if ( typeof iterable === 'string' ) { iterable = iterable . split ( '' ) ; } if ( supportsSliceOnNodeList ) { return slice . call ( iterable , start || 0 , end || iterable . length ) ; } var array = [ ] , i ; start = start || 0 ; end = end ? ( ( end < 0 ) ? iterable . length + end : end ) : iterable . length ; for ( i = start ; i < end ; i ++ ) { array . push ( iterable [ i ] ) ; } return array ; }
Converts any iterable (numeric indices and a length property) into a true array.

function test() {
var args = Ext.Array.toArray(arguments),
fromSecondToLastArgs = Ext.Array.toArray(arguments, 1);

alert(args.join(' '));
alert(fromSecondToLastArgs.join(' '));
}

test('just', 'testing', 'here'); // alerts 'just testing here';
// alerts 'testing here';

Ext.Array.toArray(document.getElementsByTagName('div')); // will convert the NodeList into an array
Ext.Array.toArray('splitted'); // returns ['s', 'p', 'l', 'i', 't', 't', 'e', 'd']
Ext.Array.toArray('splitted', 0, 3); // returns ['s', 'p', 'l']

{@link Ext#toArray Ext.toArray} is alias for {@link Ext.Array#toArray Ext.Array.toArray}

@param {Object} iterable the iterable object to be turned into a true Array.
@param {Number} start (Optional) a zero-based index that specifies the start of extraction. Defaults to 0
@param {Number} end (Optional) a 1-based index that specifies the end of extraction. Defaults to the last
index of the iterable value
@return {Array} array
Converts any iterable ( numeric indices and a length property ) into a true array .